diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Server/Core.py | 8 | ||||
-rw-r--r-- | src/lib/Server/Plugins/FileProbes.py | 6 |
2 files changed, 8 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 |