diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-03-26 12:47:14 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-03-26 12:47:14 -0400 |
commit | 64eec5fe6a9b640bb77dd65f10f3fac5a586347c (patch) | |
tree | 3b3c86bda461ff2232b9f30b0d1e873f2b6a1b9a /src/lib/Bcfg2/Server/Plugins/Bundler.py | |
parent | 9673ba716310f50855cba74195e53878316af886 (diff) | |
download | bcfg2-64eec5fe6a9b640bb77dd65f10f3fac5a586347c.tar.gz bcfg2-64eec5fe6a9b640bb77dd65f10f3fac5a586347c.tar.bz2 bcfg2-64eec5fe6a9b640bb77dd65f10f3fac5a586347c.zip |
testsuite: fixed issues found by latest version of pep8
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Bundler.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Bundler.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Bundler.py b/src/lib/Bcfg2/Server/Plugins/Bundler.py index 24301155d..a9b9bf8c1 100644 --- a/src/lib/Bcfg2/Server/Plugins/Bundler.py +++ b/src/lib/Bcfg2/Server/Plugins/Bundler.py @@ -13,7 +13,7 @@ import Bcfg2.Server.Lint try: import genshi.template.base - import Bcfg2.Server.Plugins.TGenshi + from Bcfg2.Server.Plugins.TGenshi import removecomment, TemplateFile HAS_GENSHI = True except ImportError: HAS_GENSHI = False @@ -34,14 +34,12 @@ class BundleFile(Bcfg2.Server.Plugin.StructFile): if HAS_GENSHI: - class BundleTemplateFile(Bcfg2.Server.Plugins.TGenshi.TemplateFile, + class BundleTemplateFile(TemplateFile, Bcfg2.Server.Plugin.StructFile): """ Representation of a Genshi-templated bundle XML file """ def __init__(self, name, specific, encoding): - Bcfg2.Server.Plugins.TGenshi.TemplateFile.__init__(self, name, - specific, - encoding) + TemplateFile.__init__(self, name, specific, encoding) Bcfg2.Server.Plugin.StructFile.__init__(self, name) self.logger = logging.getLogger(name) @@ -52,9 +50,9 @@ if HAS_GENSHI: msg = "No parsed template information for %s" % self.name self.logger.error(msg) raise Bcfg2.Server.Plugin.PluginExecutionError(msg) - stream = self.template.generate(metadata=metadata, - repo=SETUP['repo']).filter( - Bcfg2.Server.Plugins.TGenshi.removecomment) + stream = self.template.generate( + metadata=metadata, + repo=SETUP['repo']).filter(removecomment) data = lxml.etree.XML(stream.render('xml', strip_whitespace=False), parser=Bcfg2.Server.XMLParser) |