details: https://code.tryton.org/tryton/commit/ca69387922e2
branch: default
user: Cédric Krier <[email protected]>
date: Thu Jun 18 16:24:23 2026 +0200
description:
Write traceback of unexpected Exception in wsgi.errors
diffstat:
trytond/trytond/wsgi.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (14 lines):
diff -r 6861991936ce -r ca69387922e2 trytond/trytond/wsgi.py
--- a/trytond/trytond/wsgi.py Thu Jun 18 16:23:15 2026 +0200
+++ b/trytond/trytond/wsgi.py Thu Jun 18 16:24:23 2026 +0200
@@ -133,8 +133,9 @@
return exceptions.ServiceUnavailable(description=str(e))
except Exception as e:
logger.exception("Exception when processing %s", request)
+ tb_s = ''.join(traceback.format_exception(*sys.exc_info()))
+ request.environ['wsgi.errors'].write(tb_s)
if self.dev:
- tb_s = ''.join(traceback.format_exception(*sys.exc_info()))
for path in sys.path:
tb_s = tb_s.replace(path, '')
e.__format_traceback__ = tb_s