summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/Server/Core.py8
-rw-r--r--src/lib/Server/Plugins/FileProbes.py6
-rwxr-xr-xtools/bcfg2-profile-templates.py2
3 files changed, 10 insertions, 6 deletions
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py
index daa439db1..05625cf22 100644
--- a/src/lib/Server/Core.py
+++ b/src/lib/Server/Core.py
@@ -230,12 +230,14 @@ class Core(Component):
continue
try:
self.Bind(entry, metadata)
- except PluginExecutionError:
+ except PluginExecutionError, exc:
if 'failure' not in entry.attrib:
- entry.set('failure', 'bind error')
+ entry.set('failure', 'bind error: %s' % exc)
logger.error("Failed to bind entry: %s %s" % \
(entry.tag, entry.get('name')))
- except:
+ except Exception, exc:
+ if 'failure' not in entry.attrib:
+ entry.set('failure', 'bind error: %s' % exc)
logger.error("Unexpected failure in BindStructure: %s %s" \
% (entry.tag, entry.get('name')), exc_info=1)
diff --git a/src/lib/Server/Plugins/FileProbes.py b/src/lib/Server/Plugins/FileProbes.py
index 95e8c7a00..1ee3d0644 100644
--- a/src/lib/Server/Plugins/FileProbes.py
+++ b/src/lib/Server/Plugins/FileProbes.py
@@ -129,9 +129,8 @@ class FileProbes(Bcfg2.Server.Plugin.Plugin,
create = False
try:
cfg.entries[filename].bind_entry(entry, metadata)
- create = True
except Bcfg2.Server.Plugin.PluginExecutionError:
- pass
+ create = True
if create:
self.logger.info("Writing new probed file %s" % fileloc)
@@ -146,7 +145,8 @@ class FileProbes(Bcfg2.Server.Plugin.Plugin,
infoxml = os.path.join("%s%s" % (cfg.data, filename),
"info.xml")
- self.write_infoxml(infoxml, entry, data)
+ if not os.path.exists(infoxml):
+ self.write_infoxml(infoxml, entry, data)
# Service the FAM events queued up by the key generation
# so the data structure entries will be available for
diff --git a/tools/bcfg2-profile-templates.py b/tools/bcfg2-profile-templates.py
index e8916e6a4..eba84d02d 100755
--- a/tools/bcfg2-profile-templates.py
+++ b/tools/bcfg2-profile-templates.py
@@ -60,6 +60,8 @@ def main():
if setup['args']:
templates = setup['args']
+ else:
+ templates = []
times = dict()
for plugin in ['Cfg', 'TGenshi', 'TCheetah']: