diff options
author | Steve Tousignant <stousignant@revolutionlinux.com> | 2008-09-03 21:38:47 +0000 |
---|---|---|
committer | Steve Tousignant <stousignant@revolutionlinux.com> | 2008-09-03 21:38:47 +0000 |
commit | a89816764c80a5772bfbc6cb42e5c7b83da41a62 (patch) | |
tree | dbca06594ecebb60f508121369b949fd31e4c23f /src/lib | |
parent | dd6c96224582d126e3836c8ce499367760fb7b9f (diff) | |
download | bcfg2-a89816764c80a5772bfbc6cb42e5c7b83da41a62.tar.gz bcfg2-a89816764c80a5772bfbc6cb42e5c7b83da41a62.tar.bz2 bcfg2-a89816764c80a5772bfbc6cb42e5c7b83da41a62.zip |
Nicer traceback for debugging. Easier to read since it's line splitted
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4904 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Component.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/Component.py b/src/lib/Component.py index 2618265c7..7ee2df515 100644 --- a/src/lib/Component.py +++ b/src/lib/Component.py @@ -1,7 +1,7 @@ '''Cobalt component base classes''' __revision__ = '$Revision$' -import logging, select, signal, socket, sys, urlparse, xmlrpclib, cPickle, os +import logging, select, signal, socket, sys, urlparse, xmlrpclib, cPickle, os, traceback from base64 import decodestring import BaseHTTPServer, SimpleXMLRPCServer @@ -230,7 +230,12 @@ class Component(TLSServer, except ForkedChild: raise except: - self.logger.error("Unexpected handler failure", exc_info=1) + self.logger.error("Unexpected handler failure") + trace = sys.exc_info() + self.logger.error("%s : %s" % (str(trace[0]), str(trace[1]))) + for line in traceback.format_exc().splitlines(): + self.logger.error(line) + del trace # report exception back to server response = xmlrpclib.dumps(xmlrpclib.Fault(1, "%s:%s" % (sys.exc_type, sys.exc_value))) |