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
This commit is contained in:
parent
d358a22542
commit
4e497b10b0
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue