[FIX] netsvc: revert introduction of cgitb
authorVo Minh Thu <vmt@openerp.com>
Thu, 23 Jun 2011 14:36:51 +0000 (16:36 +0200)
committerVo Minh Thu <vmt@openerp.com>
Thu, 23 Jun 2011 14:36:51 +0000 (16:36 +0200)
(was done at revno 3452, revision-id vmt@openerp.com-20110609073416-ml22a1vhtizl3z71)

lp bug: https://launchpad.net/bugs/797690 fixed

bzr revid: vmt@openerp.com-20110623143651-v1x7obfnj48khsdj

openerp/netsvc.py
setup.py

index 42ccab4..aca1b9c 100644 (file)
@@ -24,7 +24,6 @@
 #
 ##############################################################################
 
-import cgitb
 import errno
 import heapq
 import logging
@@ -440,7 +439,7 @@ class OpenERPDispatcher:
         except Exception, e:
             self.log('exception', tools.exception_to_unicode(e))
             tb = getattr(e, 'traceback', sys.exc_info())
-            tb_s = cgitb.text(tb)
+            tb_s = "".join(traceback.format_exception(*tb))
             if tools.config['debug_mode'] and isinstance(tb, types.TracebackType):
                 import pdb
                 pdb.post_mortem(tb[2])
index 62fb0c9..930b266 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -89,7 +89,7 @@ if os.name == 'nt':
                 "pydot", "asyncore","asynchat", "reportlab", "vobject",
                 "HTMLParser", "select", "mako", "poplib",
                 "imaplib", "smtplib", "email", "yaml", "DAV",
-                "uuid", "commands", "openerp", # TODO is it necessary to include cgitb?
+                "uuid", "commands", "openerp",
             ],
             "excludes" : ["Tkconstants","Tkinter","tcl"],
         }