From: Faiyaz Ahmed Date: Wed, 7 Nov 2007 21:59:03 +0000 (+0000) Subject: If no name is specified, just print the traceback. X-Git-Tag: NodeManager-1.6-1~35 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;ds=sidebyside;h=1694282a88ff0e093a53725023df1953a2b6a92d;p=nodemanager.git If no name is specified, just print the traceback. --- diff --git a/logger.py b/logger.py index 6add200..195c1d8 100644 --- a/logger.py +++ b/logger.py @@ -29,4 +29,7 @@ def log_call(*args): def log_exc(name = None): """Log the traceback resulting from an exception.""" - log("operation on %s failed. \n %s" %(self.name, traceback.format_exc())) + if name: + log("operation on %s failed. \n %s" %(self.name, traceback.format_exc())) + else: + log(traceback.format_exc())