[FIX] P3: raise exception with existing traceback
In Python 2, to raise a new exception but reuse a traceback requires a special form of ``raise`` (``raise etype, evalue, tb``). In Python 3, this is now done via a ``with_traceback`` method on exception objects. However this requires a bit of trickery as the former is invalid syntax in Python 3, hence pycompat bridge created via an exec for Python 2.
Showing
- addons/google_calendar/models/google_calendar.py 1 addition, 1 deletionaddons/google_calendar/models/google_calendar.py
- odoo/addons/base/ir/ir_http.py 1 addition, 1 deletionodoo/addons/base/ir/ir_http.py
- odoo/addons/base/ir/ir_qweb/ir_qweb.py 1 addition, 1 deletionodoo/addons/base/ir/ir_qweb/ir_qweb.py
- odoo/addons/test_pylint/tests/test_pylint.py 6 additions, 0 deletionsodoo/addons/test_pylint/tests/test_pylint.py
- odoo/service/server.py 2 additions, 2 deletionsodoo/service/server.py
- odoo/tools/convert.py 5 additions, 1 deletionodoo/tools/convert.py
- odoo/tools/pycompat.py 7 additions, 0 deletionsodoo/tools/pycompat.py
- odoo/tools/safe_eval.py 4 additions, 4 deletionsodoo/tools/safe_eval.py
Loading
Please register or sign in to comment