Restore Python 2.3 compatibility and remove "with" usage.

This commit is contained in:
Marc-André Lemburg 2008-08-18 11:13:45 +00:00
parent 541f7da3a9
commit 4763f7184e
1 changed files with 1 additions and 2 deletions

View File

@ -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