File tree Expand file tree Collapse file tree
packages/runtime/src/worker/pyodide Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ async def __eval_code(code):
1111 "result" : str (result ) if result is not None else None ,
1212 "has_return" : result is not None ,
1313 })
14- except (KeyboardInterrupt , SystemExit , GeneratorExit ):
15- raise
1614 except BaseException as e :
1715 tb = e .__traceback__
1816 entries = traceback .extract_tb (tb )
Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ def __execfile(filepath):
1515 code_obj = compile (code_bytes , filepath , "exec" )
1616 exec (code_obj , exec_globals )
1717 return json .dumps ({"success" : True })
18- except (KeyboardInterrupt , SystemExit , GeneratorExit ):
19- raise
2018 except BaseException as e :
2119 frames = []
2220 if isinstance (e , SyntaxError ):
@@ -77,7 +75,7 @@ def __execfile(filepath):
7775 formatted_tb = "" .join (traceback .format_exception (type (e ), e , None )).strip ()
7876
7977 diagnostic = None
80- if frames :
78+ if frames and not isinstance ( e , ( KeyboardInterrupt , SystemExit )) :
8179 diagnostic = {
8280 "frames" : frames ,
8381 "message" : error_message ,
You can’t perform that action at this time.
0 commit comments