summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugin.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugin.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin.py b/src/lib/Bcfg2/Server/Plugin.py
index e22eb508e..8ba19632d 100644
--- a/src/lib/Bcfg2/Server/Plugin.py
+++ b/src/lib/Bcfg2/Server/Plugin.py
@@ -706,11 +706,9 @@ class StructFile(XMLFileBacked):
return False
negate = item.get('negate', 'false').lower() == 'true'
if item.tag == 'Group':
- return ((negate and item.get('name') not in metadata.groups) or
- (not negate and item.get('name') in metadata.groups))
+ return negate == (item.get('name') not in metadata.groups)
elif item.tag == 'Client':
- return ((negate and item.get('name') != metadata.hostname) or
- (not negate and item.get('name') == metadata.hostname))
+ return negate == (item.get('name') != metadata.hostname)
else:
return True
@@ -724,7 +722,7 @@ class StructFile(XMLFileBacked):
rv.extend(self._match(child, metadata))
return rv
else:
- rv = copy.copy(item)
+ rv = copy.deepcopy(item)
for child in rv.iterchildren():
rv.remove(child)
for child in item.iterchildren():