mirror of https://github.com/python/cpython
Restore Python 2.3 compatibility and remove "with" usage.
This commit is contained in:
parent
541f7da3a9
commit
4763f7184e
|
@ -218,8 +218,7 @@ def run_setup (script_name, script_args=None, stop_after="run"):
|
|||
sys.argv[0] = script_name
|
||||
if script_args is not None:
|
||||
sys.argv[1:] = script_args
|
||||
with open(script_name, 'r') as file:
|
||||
exec file.read() in g, l
|
||||
exec open(script_name, 'r').read() in g, l
|
||||
finally:
|
||||
sys.argv = save_argv
|
||||
_setup_stop_after = None
|
||||
|
|
Loading…
Reference in New Issue