From 4763f7184e235e4355bfccbf7f7a0d27c6ccf35e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Mon, 18 Aug 2008 11:13:45 +0000 Subject: Restore Python 2.3 compatibility and remove "with" usage. --- Lib/distutils/core.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index a0e44ea..62a3389 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 -- cgit v0.12