diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2022-01-09 00:07:53 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-09 00:07:53 -0600 |
| commit | ca47cd1fb12440ba90a64e3bb4912efa7f8149a6 (patch) | |
| tree | 45530dc5fa5f77f695064910d2ff51e5c866a350 | |
| parent | 5d2cd299e164843bae2824d17ab28d71050f1b20 (diff) | |
| parent | 1bdffcf01c47af289e313c8e4edd4e308ae37d66 (diff) | |
Merge pull request #9517 from anlancs/reload-add-str
tools: fix wrong get_contexts() of Config class.
| -rwxr-xr-x | tools/frr-reload.py | 5 |
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): """ |
