summaryrefslogtreecommitdiff
path: root/tools/frr-reload.py
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <jafar@atcorp.com>2022-01-09 00:07:53 -0600
committerGitHub <noreply@github.com>2022-01-09 00:07:53 -0600
commitca47cd1fb12440ba90a64e3bb4912efa7f8149a6 (patch)
tree45530dc5fa5f77f695064910d2ff51e5c866a350 /tools/frr-reload.py
parent5d2cd299e164843bae2824d17ab28d71050f1b20 (diff)
parent1bdffcf01c47af289e313c8e4edd4e308ae37d66 (diff)
Merge pull request #9517 from anlancs/reload-add-str
tools: fix wrong get_contexts() of Config class.
Diffstat (limited to 'tools/frr-reload.py')
-rwxr-xr-xtools/frr-reload.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/frr-reload.py b/tools/frr-reload.py
index 7de87eb869..c33c1f72a0 100755
--- a/tools/frr-reload.py
+++ b/tools/frr-reload.py
@@ -198,6 +198,9 @@ class Context(object):
for ligne in lines:
self.dlines[ligne] = True
+ def __str__(self):
+ return str(self.keys) + " : " + str(self.lines)
+
def add_lines(self, lines):
"""
Add lines to specified context
@@ -329,7 +332,7 @@ class Config(object):
Return the parsed context as strings for display, log etc.
"""
for (_, ctx) in sorted(iteritems(self.contexts)):
- print(str(ctx) + "\n")
+ print(str(ctx))
def save_contexts(self, key, lines):
"""