guydav commited on
Commit
766f0e0
1 Parent(s): 196a166

Another minor fix

Browse files
Files changed (1) hide show
  1. restrictedpython_code_eval.py +3 -0
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