KERNEL: use python 2.3 format_exception
authorced <>
Mon, 26 Mar 2007 06:51:54 +0000 (06:51 +0000)
committerced <>
Mon, 26 Mar 2007 06:51:54 +0000 (06:51 +0000)
bzr revid: ced-55c0c6a6a649faa6488447f6db42175131f4af2d

bin/netsvc.py

index 872b3f4..e018997 100644 (file)
@@ -208,7 +208,7 @@ class GenericXMLRPCRequestHandler:
                        return r
                except Exception,e:
                        logger = Logger()
-                       logger.notifyChannel("web-services", LOG_ERROR, 'Exception in call: ' + reduce(lambda x, y: x+y, traceback.format_exc()))
+                       logger.notifyChannel("web-services", LOG_ERROR, 'Exception in call: ' + reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)))
                        s=str(e)
                        import tools
                        if tools.config['debug_mode']:
@@ -304,7 +304,7 @@ class TinySocketClientThread(threading.Thread):
                                        ts.mysend(r)
                                except Exception, e:
                                        logger = Logger()
-                                       logger.notifyChannel("web-services", LOG_ERROR, 'Exception in call: ' + reduce(lambda x, y: x+y, traceback.format_exc()))
+                                       logger.notifyChannel("web-services", LOG_ERROR, 'Exception in call: ' + reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)))
                                        s=str(e)
                                        import tools
                                        if tools.config['debug_mode']: