diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-03-20 14:42:25 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-03-20 14:42:25 -0400 |
commit | 45cd60e18e5cb22619272ae8a0d6e2af692d1cf7 (patch) | |
tree | efdde946493c8b9fa102dc389e4c7a1a79969d76 /src/lib/Server/Plugins | |
parent | 961783ceeedb97233a4dca5f0fc58f20b23f41c7 (diff) | |
download | bcfg2-45cd60e18e5cb22619272ae8a0d6e2af692d1cf7.tar.gz bcfg2-45cd60e18e5cb22619272ae8a0d6e2af692d1cf7.tar.bz2 bcfg2-45cd60e18e5cb22619272ae8a0d6e2af692d1cf7.zip |
removed unnecessary code
Diffstat (limited to 'src/lib/Server/Plugins')
-rw-r--r-- | src/lib/Server/Plugins/Bundler.py | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/src/lib/Server/Plugins/Bundler.py b/src/lib/Server/Plugins/Bundler.py index be77cd59b..a58257712 100644 --- a/src/lib/Server/Plugins/Bundler.py +++ b/src/lib/Server/Plugins/Bundler.py @@ -78,26 +78,24 @@ class Bundler(Bcfg2.Server.Plugin.Plugin, bundle_entries = {} for key, item in self.entries.items(): - bundle_entries.setdefault(self.patterns.match(os.path.basename(key)).group('name'), []).append(item) + bundle_entries.setdefault(self.patterns.match(os.path.basename(key)).group('name'), + []).append(item) for bundlename in metadata.bundles: try: entries = bundle_entries[bundlename] except KeyError: - self.logger.error("Bundler: Bundle %s does not exist" % bundlename) + self.logger.error("Bundler: Bundle %s does not exist" % + bundlename) continue - elif len(entries) == 1: - try: - bundleset.append(entries[0].get_xml_value(metadata)) - except genshi.template.base.TemplateError: - t = sys.exc_info()[1] - self.logger.error("Bundler: Failed to template genshi bundle %s" \ - % (bundlename)) - self.logger.error(t) - except: - self.logger.error("Bundler: Unexpected bundler error for %s" \ - % (bundlename), exc_info=1) - else: - self.logger.error("Got multiple matches for bundle %s" \ - % (bundlename)) + try: + bundleset.append(entries[0].get_xml_value(metadata)) + except genshi.template.base.TemplateError: + t = sys.exc_info()[1] + self.logger.error("Bundler: Failed to template genshi bundle %s" + % bundlename) + self.logger.error(t) + except: + self.logger.error("Bundler: Unexpected bundler error for %s" % + bundlename, exc_info=1) return bundleset |