Commit e5208ad7 authored by Matias Guijarro's avatar Matias Guijarro

shell/cli/ suppress exception context when raising exception in _execute_task

ptpython tries to execute code with 'eval', if it fails because of SyntaxError it
executes the code with 'exec'. The problem is that the SyntaxError exception
becomes part of the context of any further exception that can be raised.
So, the traceback displays a scary, unhelpful traceback with SyntaxError.
This change removes this problem, by clearing the context.
parent 66567c7b
Pipeline #11650 passed with stages
in 35 minutes and 28 seconds
......@@ -256,7 +256,7 @@ class BlissRepl(PythonRepl):
and len(return_value) >= 3
and isinstance(return_value[1], (BaseException, Exception))
raise return_value[1].with_traceback(return_value[2])
raise return_value[1].with_traceback(return_value[2]) from None
except gevent.Timeout:
except KeyboardInterrupt:
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment