mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-25 16:06:43 +00:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user