diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-05-20 09:09:06 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-05-20 09:09:06 -0400 |
commit | 5945f7f16a40066f748808c35d1db4dd0de291b6 (patch) | |
tree | 29b3196df11b32546e425d53afea802ca524b829 /src/lib/Bcfg2/Server/Plugins/GroupLogic.py | |
parent | 5556996cc1f8120f27adf7dcf00713398bc6f9a3 (diff) | |
download | bcfg2-5945f7f16a40066f748808c35d1db4dd0de291b6.tar.gz bcfg2-5945f7f16a40066f748808c35d1db4dd0de291b6.tar.bz2 bcfg2-5945f7f16a40066f748808c35d1db4dd0de291b6.zip |
cleaned up old references to BundleTemplateFile
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/GroupLogic.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/GroupLogic.py | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/GroupLogic.py b/src/lib/Bcfg2/Server/Plugins/GroupLogic.py index 810b273af..59d0fa561 100644 --- a/src/lib/Bcfg2/Server/Plugins/GroupLogic.py +++ b/src/lib/Bcfg2/Server/Plugins/GroupLogic.py @@ -4,22 +4,17 @@ template to dynamically set additional groups for clients. """ import os import lxml.etree import Bcfg2.Server.Plugin -try: - from Bcfg2.Server.Plugins.Bundler import BundleTemplateFile -except ImportError: - # BundleTemplateFile missing means that genshi is missing. we - # import genshi to get the _real_ error - import genshi # pylint: disable=W0611 +from Bcfg2.Server.Plugins.Bundler import BundleFile -class GroupLogicConfig(BundleTemplateFile): +class GroupLogicConfig(BundleFile): """ Representation of the GroupLogic groups.xml file """ create = lxml.etree.Element("GroupLogic", nsmap=dict(py="http://genshi.edgewall.org/")) def __init__(self, name, fam): - BundleTemplateFile.__init__(self, name, - Bcfg2.Server.Plugin.Specificity(), None) + BundleFile.__init__(self, name, + Bcfg2.Server.Plugin.Specificity(), None) self.fam = fam self.should_monitor = True self.fam.AddMonitor(self.name, self) @@ -27,7 +22,7 @@ class GroupLogicConfig(BundleTemplateFile): def _match(self, item, metadata): if item.tag == 'Group' and not len(item.getchildren()): return [item] - return BundleTemplateFile._match(self, item, metadata) + return BundleFile._match(self, item, metadata) class GroupLogic(Bcfg2.Server.Plugin.Plugin, @@ -44,4 +39,4 @@ class GroupLogic(Bcfg2.Server.Plugin.Plugin, def get_additional_groups(self, metadata): return [el.get("name") - for el in self.config.get_xml_value(metadata).findall("Group")] + for el in self.config.XMLMatch(metadata).findall("Group")] |