[FIX]:--debug option
lp bug: https://launchpad.net/bugs/815779 fixed bzr revid: nch@tinyerp.com-20110729112019-yu4cbcgsmnph3iaz
This commit is contained in:
parent
b3b00733af
commit
c86be45623
|
@ -449,7 +449,7 @@ class OpenERPDispatcher:
|
||||||
self.log('exception', tools.exception_to_unicode(e))
|
self.log('exception', tools.exception_to_unicode(e))
|
||||||
tb = getattr(e, 'traceback', sys.exc_info())
|
tb = getattr(e, 'traceback', sys.exc_info())
|
||||||
tb_s = "".join(traceback.format_exception(*tb))
|
tb_s = "".join(traceback.format_exception(*tb))
|
||||||
if tools.config['debug_mode'] and isinstance(tb, types.TracebackType):
|
if tools.config['debug_mode'] and isinstance(tb[2], types.TracebackType):
|
||||||
import pdb
|
import pdb
|
||||||
pdb.post_mortem(tb[2])
|
pdb.post_mortem(tb[2])
|
||||||
raise OpenERPDispatcherException(e, tb_s)
|
raise OpenERPDispatcherException(e, tb_s)
|
||||||
|
|
Loading…
Reference in New Issue