diff options
| author | Brett Cannon <bcannon@gmail.com> | 2008-08-17 04:16:04 (GMT) |
|---|---|---|
| committer | Brett Cannon <bcannon@gmail.com> | 2008-08-17 04:16:04 (GMT) |
| commit | 047e4a915d899b31dcb49fd820914df6a9991870 (patch) | |
| tree | e9d90462ffbe4d527fbbdb908eda52b4213578ab /Lib/distutils/core.py | |
| parent | 94f243aa41286fa6f3733c21d7936222e7f6c251 (diff) | |
| download | cpython-047e4a915d899b31dcb49fd820914df6a9991870.zip cpython-047e4a915d899b31dcb49fd820914df6a9991870.tar.gz cpython-047e4a915d899b31dcb49fd820914df6a9991870.tar.bz2 | |
Update distutils so that it triggers no warnings when run under -3.
Diffstat (limited to 'Lib/distutils/core.py')
| -rw-r--r-- | Lib/distutils/core.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index de9ce7d..a0e44ea 100644 --- a/Lib/distutils/core.py +++ b/Lib/distutils/core.py @@ -218,7 +218,8 @@ 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 - execfile(script_name, g, l) + with open(script_name, 'r') as file: + exec file.read() in g, l finally: sys.argv = save_argv _setup_stop_after = None |
