bugfix in netcfg to handle multilevel commands

this fixes a bug where netcfg would not properly find a statement that was
more than one level deep
pull/15268/head
Peter Sprygada 9 years ago
parent d358a22542
commit 4e497b10b0

@ -174,7 +174,8 @@ class NetworkConfig(object):
def get_object(self, path):
for item in self.items:
if item.text == path[-1]:
if item.parents == path[:-1]:
parents = [p.text for p in item.parents]
if parents == path[:-1]:
return item
def get_children(self, path):

Loading…
Cancel
Save