summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-10-05 14:16:08 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-10-05 14:16:08 -0400
commite8821c043cdee6ab61b811fcc508fb83f85ce71b (patch)
tree692855e630d9a3a484e0c8624a3388c0afa5e5e1
parent4ab7706aca76118de9b3c1cabdc395b82b1acf58 (diff)
downloadbcfg2-e8821c043cdee6ab61b811fcc508fb83f85ce71b.tar.gz
bcfg2-e8821c043cdee6ab61b811fcc508fb83f85ce71b.tar.bz2
bcfg2-e8821c043cdee6ab61b811fcc508fb83f85ce71b.zip
fixed issue with bogus filenames in Bundler in a more generic way for all DirectoryBacked plugins
-rw-r--r--src/lib/Server/Plugin.py5
-rw-r--r--src/lib/Server/Plugins/Bundler.py9
2 files changed, 4 insertions, 10 deletions
diff --git a/src/lib/Server/Plugin.py b/src/lib/Server/Plugin.py
index 414713793..a621944a6 100644
--- a/src/lib/Server/Plugin.py
+++ b/src/lib/Server/Plugin.py
@@ -518,11 +518,10 @@ class DirectoryBacked(object):
if ((event.filename[-1] == '~') or
(event.filename[:2] == '.#') or
(event.filename[-4:] == '.swp') or
- (event.filename in ['SCCS', '.svn', '4913'])):
+ (event.filename in ['SCCS', '.svn', '4913']) or
+ (not self.patterns.match(event.filename))):
return
if action in ['exists', 'created']:
- if not self.patterns.match(event.filename):
- return
self.add_entry(relpath, event)
elif action == 'changed':
if relpath in self.entries:
diff --git a/src/lib/Server/Plugins/Bundler.py b/src/lib/Server/Plugins/Bundler.py
index ec73d5022..bf0c42416 100644
--- a/src/lib/Server/Plugins/Bundler.py
+++ b/src/lib/Server/Plugins/Bundler.py
@@ -52,13 +52,8 @@ class Bundler(Bcfg2.Server.Plugin.Plugin,
raise Bcfg2.Server.Plugin.PluginInitError
def template_dispatch(self, name):
- if name.endswith('.xml') or name.endswith('.genshi'):
- bundle = lxml.etree.parse(name)
- nsmap = bundle.getroot().nsmap
- else:
- self.logger.warning("Skipping unknown file %s" % name)
- return
-
+ bundle = lxml.etree.parse(name)
+ nsmap = bundle.getroot().nsmap
if name.endswith('.xml'):
if have_genshi and \
(nsmap == {'py': 'http://genshi.edgewall.org/'}):