Spaces:
Sleeping
Sleeping
Another minor fix
Browse files
restrictedpython_code_eval.py
CHANGED
@@ -602,6 +602,9 @@ def _unsafe_execute(check_program, result, timeout,
|
|
602 |
if '_apply_' not in exec_globals:
|
603 |
exec_globals['_apply_'] = _apply # type: ignore
|
604 |
|
|
|
|
|
|
|
605 |
if additional_locals is not None:
|
606 |
additional_globals.update(additional_locals)
|
607 |
|
|
|
602 |
if '_apply_' not in exec_globals:
|
603 |
exec_globals['_apply_'] = _apply # type: ignore
|
604 |
|
605 |
+
if '__name__' not in exec_globals:
|
606 |
+
exec_globals['__name__'] = 'code_eval' # type: ignore
|
607 |
+
|
608 |
if additional_locals is not None:
|
609 |
additional_globals.update(additional_locals)
|
610 |
|