summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugin.py
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2009-03-19 15:04:25 +0000
committerSol Jerome <solj@ices.utexas.edu>2009-03-19 15:04:25 +0000
commit2b822c36ae87802b744a908e57e1ef7bdc485d16 (patch)
tree3866cfeb7ed88a6ff596bc006106b6666e9413b2 /src/lib/Server/Plugin.py
parent1a140e1fada7b7ae430dec50c7a76e5ddbc9d221 (diff)
downloadbcfg2-2b822c36ae87802b744a908e57e1ef7bdc485d16.tar.gz
bcfg2-2b822c36ae87802b744a908e57e1ef7bdc485d16.tar.bz2
bcfg2-2b822c36ae87802b744a908e57e1ef7bdc485d16.zip
Fix negate attribute for ticket #648
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5129 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugin.py')
-rw-r--r--src/lib/Server/Plugin.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/Server/Plugin.py b/src/lib/Server/Plugin.py
index a1d82200a..d9133a7fc 100644
--- a/src/lib/Server/Plugin.py
+++ b/src/lib/Server/Plugin.py
@@ -277,7 +277,8 @@ class StructFile(XMLFileBacked):
and not isinstance(item, lxml.etree._Comment)]
for group in [item for item in worklist if item.tag == 'Group']:
# if only python had forceable early-binding
- if group.get('negate', 'false') == 'true':
+ if group.get('negate', 'false') == 'true' or
+ group.get('negate', 'false') == 'True':
cmd = "lambda x:'%s' not in x.groups and predicate(x)"
else:
cmd = "lambda x:'%s' in x.groups and predicate(x)"
@@ -309,7 +310,8 @@ class INode:
self.predicate = lambda x:True
else:
predicate = parent.predicate
- if data.get('negate', 'false') == 'true':
+ if data.get('negate', 'false') == 'true'
+ data.get('negate', 'false') == 'True':
psrc = self.nraw
else:
psrc = self.raw