Commit 8ef1d20c authored by Pino Toscano's avatar Pino Toscano
Browse files

scripting: use PyErr_NormalizeException

make sure the Python objects for the exception are normalized; not doing
so seems working fine with Python 2.7, however with Python 3.8 it is
needed to be able to call traceback.format_exception() later with those
objects
parent c36a3ccd
......@@ -569,6 +569,7 @@ void PythonScripter::saveErrors()
PyObject* poexcvalue;
PyObject* poexctraceback;
PyErr_Fetch( &poexctype, &poexcvalue, &poexctraceback );
PyErr_NormalizeException( &poexctype, &poexcvalue, &poexctraceback );
handle<> exctypeh( poexctype );
handle<> excvalueh( poexcvalue );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment