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 12:36:24 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-09-19 12:36:24 -0400
commit88c99b4af0840bccba5f2284a904c4034f7351bd (patch)
treefe2f6214d6222cc01d34a73d41f78e4ed636cc87 /src/lib/Server/Plugins/GroupPatterns.py
parent56ad9881e7472e695357a630dccb4f5a989209f2 (diff)
downloadbcfg2-88c99b4af0840bccba5f2284a904c4034f7351bd.tar.gz
bcfg2-88c99b4af0840bccba5f2284a904c4034f7351bd.tar.bz2
bcfg2-88c99b4af0840bccba5f2284a904c4034f7351bd.zip
fixed previous commit so that SingleXMLFileBacked plugins use xinclude, and GroupPatterns uses SingleXMLFileBacked correctly
Diffstat (limited to 'src/lib/Server/Plugins/GroupPatterns.py')
-rw-r--r--src/lib/Server/Plugins/GroupPatterns.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/Server/Plugins/GroupPatterns.py b/src/lib/Server/Plugins/GroupPatterns.py
index 16b619c51..76a628931 100644
--- a/src/lib/Server/Plugins/GroupPatterns.py
+++ b/src/lib/Server/Plugins/GroupPatterns.py
@@ -70,18 +70,16 @@ class PatternMap(object):
class PatternFile(Bcfg2.Server.Plugin.SingleXMLFileBacked):
+ __identifier__ = None
+
def __init__(self, filename, fam):
Bcfg2.Server.Plugin.SingleXMLFileBacked.__init__(self, filename, fam)
self.patterns = []
def Index(self):
+ Bcfg2.Server.Plugin.SingleXMLFileBacked.Index(self)
self.patterns = []
- try:
- parsed = lxml.etree.XML(self.data)
- except:
- self.logger.error("Failed to read file %s" % self.name)
- return
- for entry in parsed.findall('GroupPattern'):
+ for entry in self.xdata.xpath('//GroupPattern'):
try:
groups = [g.text for g in entry.findall('Group')]
for pat_ent in entry.findall('NamePattern'):