# HG changeset patch # User darius # Date 1190640887 0 # Node ID 1af7c85d5a0e5f4f8c11b978a9db69636bfc2c5b # Parent 17bc5535bbb762f3515ee5b2521bd380651db05d Log backtrace on unexpected exception. diff -r 17bc5535bbb7 -r 1af7c85d5a0e beermon.py --- a/beermon.py Mon Sep 24 13:31:15 2007 +0000 +++ b/beermon.py Mon Sep 24 13:34:47 2007 +0000 @@ -4,7 +4,7 @@ # Monitor & control fermenter temperature # v1.0 # -# $Id: beermon.py,v 1.3 2007/09/24 13:31:15 darius Exp $ +# $Id: beermon.py,v 1.4 2007/09/24 13:34:47 darius Exp $ # # Depends on: Python 2.3 (I think) # @@ -309,7 +309,7 @@ log = initLog() log.debug("=== Initing ===") - log.debug("$Id: beermon.py,v 1.3 2007/09/24 13:31:15 darius Exp $") + log.debug("$Id: beermon.py,v 1.4 2007/09/24 13:34:47 darius Exp $") m = None exitCode = 0 @@ -327,10 +327,10 @@ log.debug("Exiting due to keyboard interrupt") except Exception, e: - log.debug("Something went wrong, details below") + log.debug("Something went wrong, details below:") log.debug(e) - #log.debug(reduce(lambda x, y: x + y, traceback.format_exception( - # sys.last_type, sys.last_value, sys.last_traceback))) + log.debug(reduce(lambda x, y: x + y, traceback.format_exception( + sys.exc_type, sys.exc_value, sys.exc_traceback))) exitCode = 1 finally: