mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 07:37:54 +00:00
Merge pull request #9517 from anlancs/reload-add-str
tools: fix wrong get_contexts() of Config class.
This commit is contained in:
commit
ca47cd1fb1
@ -198,6 +198,9 @@ class Context(object):
|
|||||||
for ligne in lines:
|
for ligne in lines:
|
||||||
self.dlines[ligne] = True
|
self.dlines[ligne] = True
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return str(self.keys) + " : " + str(self.lines)
|
||||||
|
|
||||||
def add_lines(self, lines):
|
def add_lines(self, lines):
|
||||||
"""
|
"""
|
||||||
Add lines to specified context
|
Add lines to specified context
|
||||||
@ -329,7 +332,7 @@ class Config(object):
|
|||||||
Return the parsed context as strings for display, log etc.
|
Return the parsed context as strings for display, log etc.
|
||||||
"""
|
"""
|
||||||
for (_, ctx) in sorted(iteritems(self.contexts)):
|
for (_, ctx) in sorted(iteritems(self.contexts)):
|
||||||
print(str(ctx) + "\n")
|
print(str(ctx))
|
||||||
|
|
||||||
def save_contexts(self, key, lines):
|
def save_contexts(self, key, lines):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user