summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Core.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Server/Core.py')
-rw-r--r--src/lib/Bcfg2/Server/Core.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/lib/Bcfg2/Server/Core.py b/src/lib/Bcfg2/Server/Core.py
index 81bfebbb5..782aafbf1 100644
--- a/src/lib/Bcfg2/Server/Core.py
+++ b/src/lib/Bcfg2/Server/Core.py
@@ -552,18 +552,16 @@ class BaseCore(object):
continue
try:
self.Bind(entry, metadata)
- except PluginExecutionError:
- exc = sys.exc_info()[1]
- if 'failure' not in entry.attrib:
- entry.set('failure', 'bind error: %s' % exc)
- self.logger.error("Failed to bind entry %s:%s: %s" %
- (entry.tag, entry.get('name'), exc))
- except Exception:
+ except:
exc = sys.exc_info()[1]
if 'failure' not in entry.attrib:
entry.set('failure', 'bind error: %s' % exc)
- self.logger.error("Unexpected failure in BindStructure: %s %s"
- % (entry.tag, entry.get('name')), exc_info=1)
+ if isinstance(exc, PluginExecutionError):
+ msg = "Failed to bind entry"
+ else:
+ msg = "Unexpected failure binding entry"
+ self.logger.error("%s %s:%s: %s" %
+ (msg, entry.tag, entry.get('name'), exc))
def Bind(self, entry, metadata):
""" Bind a single entry using the appropriate generator.