From: Marc-André Lemburg Date: Mon, 18 Aug 2008 11:13:45 +0000 (+0000) Subject: Restore Python 2.3 compatibility and remove "with" usage. X-Git-Tag: v2.6b3~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4763f7184e235e4355bfccbf7f7a0d27c6ccf35e;p=thirdparty%2FPython%2Fcpython.git Restore Python 2.3 compatibility and remove "with" usage. --- diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index a0e44ea63163..62a3389b5380 100644 --- a/Lib/distutils/core.py +++ b/Lib/distutils/core.py @@ -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