summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Client/Tools/__init__.py
diff options
context:
space:
mode:
authorJonah BrĂ¼chert <jbb@kaidan.im>2024-02-01 12:07:24 +0100
committerJonah BrĂ¼chert <jbb@kaidan.im>2024-02-01 12:13:39 +0100
commitc7b3b32e5768a165bbc156f8abb12af428152ee3 (patch)
tree2a5a420e949cee95f91150f5e596517d9b9cb5c3 /src/lib/Bcfg2/Client/Tools/__init__.py
parente7eaa48daf65046dedc97574cf433296e27db5bd (diff)
downloadbcfg2-c7b3b32e5768a165bbc156f8abb12af428152ee3.tar.gz
bcfg2-c7b3b32e5768a165bbc156f8abb12af428152ee3.tar.bz2
bcfg2-c7b3b32e5768a165bbc156f8abb12af428152ee3.zip
Apply changes from the magically working debian package
Diffstat (limited to 'src/lib/Bcfg2/Client/Tools/__init__.py')
-rw-r--r--src/lib/Bcfg2/Client/Tools/__init__.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/__init__.py b/src/lib/Bcfg2/Client/Tools/__init__.py
index 2e3421840..c84b6aac8 100644
--- a/src/lib/Bcfg2/Client/Tools/__init__.py
+++ b/src/lib/Bcfg2/Client/Tools/__init__.py
@@ -190,12 +190,12 @@ class Tool(object):
:returns: dict - A dict of the state of entries suitable for
updating :attr:`Bcfg2.Client.Client.states`
"""
- if not structures:
- structures = self.config.getchildren()
+ if structures is None:
+ structures = self.config
mods = self.buildModlist()
states = dict()
for struct in structures:
- for entry in struct.getchildren():
+ for entry in struct:
if self.canVerify(entry):
try:
func = getattr(self, "Verify%s" % entry.tag)
@@ -261,8 +261,8 @@ class Tool(object):
:returns: list of lxml.etree._Element """
rv = []
- for struct in self.config.getchildren():
- rv.extend([entry for entry in struct.getchildren()
+ for struct in self.config:
+ rv.extend([entry for entry in struct
if self.handlesEntry(entry)])
return rv
@@ -282,8 +282,8 @@ class Tool(object):
:returns: list of lxml.etree._Element """
rv = []
- for struct in self.config.getchildren():
- rv.extend([entry.get('name') for entry in struct.getchildren()
+ for struct in self.config:
+ rv.extend([entry.get('name') for entry in struct
if entry.tag == 'Path'])
return rv