summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/GroupPatterns.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-09-19 11:14:20 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-09-19 11:14:20 -0400
commit56ad9881e7472e695357a630dccb4f5a989209f2 (patch)
treec769baacf9f7d6f8c49a16e1b6eebe588efd805e /src/lib/Server/Plugins/GroupPatterns.py
parentfe9b75662276326898458a68744b920ebd9d46b8 (diff)
downloadbcfg2-56ad9881e7472e695357a630dccb4f5a989209f2.tar.gz
bcfg2-56ad9881e7472e695357a630dccb4f5a989209f2.tar.bz2
bcfg2-56ad9881e7472e695357a630dccb4f5a989209f2.zip
made all XMLFileBacked plugins (e.g., GroupPatterns) support XInclude
Diffstat (limited to 'src/lib/Server/Plugins/GroupPatterns.py')
-rw-r--r--src/lib/Server/Plugins/GroupPatterns.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/lib/Server/Plugins/GroupPatterns.py b/src/lib/Server/Plugins/GroupPatterns.py
index 7faead39a..16b619c51 100644
--- a/src/lib/Server/Plugins/GroupPatterns.py
+++ b/src/lib/Server/Plugins/GroupPatterns.py
@@ -79,7 +79,7 @@ class PatternFile(Bcfg2.Server.Plugin.SingleXMLFileBacked):
try:
parsed = lxml.etree.XML(self.data)
except:
- Bcfg2.Server.Plugin.logger.error("Failed to read file %s" % self.name)
+ self.logger.error("Failed to read file %s" % self.name)
return
for entry in parsed.findall('GroupPattern'):
try:
@@ -91,9 +91,8 @@ class PatternFile(Bcfg2.Server.Plugin.SingleXMLFileBacked):
rng = range_ent.text
self.patterns.append(PatternMap(None, rng, groups))
except:
- Bcfg2.Server.Plugin.logger.error(\
- "GroupPatterns: Failed to initialize pattern %s" % \
- (entry.get('pattern')))
+ self.logger.error("GroupPatterns: Failed to initialize pattern "
+ "%s" % entry.get('pattern'))
def process_patterns(self, hostname):
ret = []
@@ -103,9 +102,9 @@ class PatternFile(Bcfg2.Server.Plugin.SingleXMLFileBacked):
if gn is not None:
ret.extend(gn)
except:
- Bcfg2.Server.Plugin.logger.error(\
- "GroupPatterns: Failed to process pattern %s for %s" % \
- (pattern.pattern, hostname), exc_info=1)
+ self.logger.error("GroupPatterns: Failed to process pattern %s "
+ "for %s" % (pattern.pattern, hostname),
+ exc_info=1)
return ret