summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac/bundlebuilder.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-08-12 00:43:29 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-08-12 00:43:29 (GMT)
commit016880229a369a3fb419f3eed28b6db7c342fe71 (patch)
tree9b11de5c197bc556dd515e035327673765cd4871 /Lib/plat-mac/bundlebuilder.py
parent41eaedd3613cebc83e6b9925499369992c7a7770 (diff)
downloadcpython-016880229a369a3fb419f3eed28b6db7c342fe71.zip
cpython-016880229a369a3fb419f3eed28b6db7c342fe71.tar.gz
cpython-016880229a369a3fb419f3eed28b6db7c342fe71.tar.bz2
Kill execfile(), use exec() instead
Diffstat (limited to 'Lib/plat-mac/bundlebuilder.py')
-rwxr-xr-xLib/plat-mac/bundlebuilder.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/plat-mac/bundlebuilder.py b/Lib/plat-mac/bundlebuilder.py
index e833add..d8186c1 100755
--- a/Lib/plat-mac/bundlebuilder.py
+++ b/Lib/plat-mac/bundlebuilder.py
@@ -322,7 +322,12 @@ ARGV_EMULATOR = """\
import argvemulator, os
argvemulator.ArgvCollector().mainloop()
-execfile(os.path.join(os.path.split(__file__)[0], "%(realmainprogram)s"))
+fp = os.path.join(os.path.split(__file__)[0], "%(realmainprogram)s")
+try:
+ script = fp.read()
+finally:
+ fp.close()
+exec(script)
"""
#