# HG changeset patch # User darius # Date 1190640887 0 # Node ID dba51b33fd9e6e9b97195dce5f2f079a0e76148c # Parent 618372f83862259ea397728a0e97434a6e99237e Log backtrace on unexpected exception. diff -r 618372f83862 -r dba51b33fd9e 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: