Skip to content

Commit 63fdc51

Browse files
committed
lispy-python.py (eval_code): Use exec instead of eval only on SyntaxError
1 parent 4f511d4 commit 63fdc51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lispy-python.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ def eval_code(_code: str, _env: Dict[str, Any] = {}) -> EvalResult:
785785
try:
786786
# pylint: disable=eval-used
787787
_res = eval(ast.unparse(last), _f.f_globals, locals_2)
788-
except:
788+
except SyntaxError:
789789
locals_1 = _locals
790790
locals_2 = locals_1.copy()
791791
exec(ast.unparse(last), _f.f_globals, locals_2)

0 commit comments

Comments
 (0)