Reviewers: ,
Please review this at http://codereview.tryton.org/152001/
Affected files:
M tryton/client.py
M tryton/common/common.py
Index: tryton/client.py
===================================================================
--- a/tryton/client.py
+++ b/tryton/client.py
@@ -99,7 +99,7 @@
def excepthook(exctyp, exception, tb):
import common
- common.process_exception(exception)
+ common.process_exception(exception, tb=tb)
sys.excepthook = excepthook
Index: tryton/common/common.py
===================================================================
--- a/tryton/common/common.py
+++ b/tryton/common/common.py
@@ -966,7 +966,7 @@
PLOCK = Lock()
-def process_exception(exception, *args):
+def process_exception(exception, *args, **kwargs):
if isinstance(exception, TrytonError):
if exception.faultCode == 'BadFingerprint':
@@ -1057,7 +1057,10 @@
error_title, error_detail = exception.faultCode,
exception.faultString
else:
error_title = str(exception)
- error_detail = traceback.format_exc()
+ if 'tb' in kwargs:
+ error_detail = kwargs['tb']
+ else:
+ error_detail = traceback.format_exc()
error(error_title, error_detail)
return False
--
[email protected] mailing list