diff options
author | Calen Pennington <cpennington@wgen.net> | 2011-12-12 10:32:25 -0500 |
---|---|---|
committer | Calen Pennington <cpennington@wgen.net> | 2011-12-12 10:40:21 -0500 |
commit | 23d119e6129feb652a0d2da1ea3bef1c8534b68f (patch) | |
tree | 4ef443cfcb4682439b10d75fc20fe5ba27090d57 /src | |
parent | efa3a5ccda85548cd065dcf90a2aa690c2a6332e (diff) | |
download | bcfg2-23d119e6129feb652a0d2da1ea3bef1c8534b68f.tar.gz bcfg2-23d119e6129feb652a0d2da1ea3bef1c8534b68f.tar.bz2 bcfg2-23d119e6129feb652a0d2da1ea3bef1c8534b68f.zip |
Add the failure attribute on unknown bind errors, as well as on PluginExecutionErrors
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Server/Core.py | 8 |
1 files changed, 5 insertions, 3 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) |