Kaydet (Commit) 4763f718 authored tarafından Marc-André Lemburg's avatar Marc-André Lemburg

Restore Python 2.3 compatibility and remove "with" usage.

üst 541f7da3
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment