summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sbin/bcfg214
1 files changed, 12 insertions, 2 deletions
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2
index 8ed4bbbc3..1741e748b 100644
--- a/src/sbin/bcfg2
+++ b/src/sbin/bcfg2
@@ -1,9 +1,10 @@
#!/usr/bin/env python
from getopt import getopt, GetoptError
from os import popen, chmod, unlink
-from sys import argv, exit
+from sys import argv, exit, exc_info
from string import join
from tempfile import mktemp
+from traceback import extract_tb
from elementtree.ElementTree import Element, XML, tostring
@@ -117,7 +118,16 @@ if __name__ == '__main__':
for entry in [k for (k,v) in entrystate.iteritems() if not v]:
method = getattr(toolset, "Install%s"%(entry.tag))
- entrystate[entry] = method(entry)
+ try:
+ entrystate[entry] = method(entry)
+ except:
+ print "Install failed for %s"%(tostring(entry))
+ (t,v,tb) = exc_info()
+ print "Unexpected failure in Install:"
+ for line in extract_tb(tb):
+ print "File %s, line %i, in %s\n %s\n"%(line)
+ print "%s: %s\n"%(t,v)
+ del t,v,tb
for structure in structurestate.keys():
if structurestate[structure]: