File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -341,10 +341,12 @@ const char *init_script =
341341" fp = os.fdopen(fd, 'w')\n "
342342" sys.stdout = fp\n "
343343" sys.stderr = fp\n "
344+ " attached = True\n "
344345" except Exception as e:\n "
345346" fp = open(os.devnull, 'w')\n "
346347" sys.stdout = fp\n "
347348" sys.stderr = fp\n "
349+ " attached = False\n "
348350#endif
349351" for n in ['.', 'lib', 'site-packages']:\n "
350352" test = os.path.abspath(os.path.join(PYSTAND_HOME, n))\n "
@@ -358,7 +360,9 @@ const char *init_script =
358360" try:\n "
359361" code = compile(text, PYSTAND_SCRIPT, 'exec')\n "
360362" exec(code, environ)\n "
361- " except:\n "
363+ " except Exception:\n "
364+ " if attached:\n "
365+ " raise\n "
362366" import traceback, io\n "
363367" sio = io.StringIO()\n "
364368" traceback.print_exc(file = sio)\n "
You can’t perform that action at this time.
0 commit comments