diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-12 00:43:29 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-12 00:43:29 +0000 |
commit | 48a31a022c39e3ed194329b949d19e014a48f1d9 (patch) | |
tree | 18afcc1017c9bf5f45abaec602b533ffdf5d4701 /Tools/versioncheck | |
parent | 1e156520ff8c4e9f69d9252a2426d319a1cc356c (diff) | |
download | cpython-48a31a022c39e3ed194329b949d19e014a48f1d9.tar.gz |
Kill execfile(), use exec() instead
Diffstat (limited to 'Tools/versioncheck')
-rw-r--r-- | Tools/versioncheck/README | 2 | ||||
-rw-r--r-- | Tools/versioncheck/checkversions.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Tools/versioncheck/README b/Tools/versioncheck/README index a51411b042..1dd2eca45e 100644 --- a/Tools/versioncheck/README +++ b/Tools/versioncheck/README @@ -19,7 +19,7 @@ your distribution. In stead of a single URL you can also specify a list of URLs. Each of these will be checked in order until one is available, this is handy for distributions that live in multiple places. Put the primary distribution site (the most up-to-date site) before others. -The script is executed with execfile(), not imported, and the current +The script is read and executed with exec(), not imported, and the current directory is the checkversion directory, so be careful with globals, importing, etc. diff --git a/Tools/versioncheck/checkversions.py b/Tools/versioncheck/checkversions.py index 27c16e7b44..ccb544d4c1 100644 --- a/Tools/versioncheck/checkversions.py +++ b/Tools/versioncheck/checkversions.py @@ -26,7 +26,7 @@ def check1dir(dummy, dir, files): if CHECKNAME in files: fullname = os.path.join(dir, CHECKNAME) try: - execfile(fullname) + exec(open(fullname).read()) except: print('** Exception in', fullname) |