summaryrefslogtreecommitdiffstats
path: root/Tools/scripts/h2py.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-09-06 06:51:57 (GMT)
committerGeorg Brandl <georg@python.org>2006-09-06 06:51:57 (GMT)
commit7cae87ca7b0a3a7ce497cbd335c8ec82fe680476 (patch)
tree612cc46e728bef49b19f3d4bc26fa4951b2c1c83 /Tools/scripts/h2py.py
parent4e472e05bdddde72d91d6f25d6e048371cf3c9be (diff)
downloadcpython-7cae87ca7b0a3a7ce497cbd335c8ec82fe680476.zip
cpython-7cae87ca7b0a3a7ce497cbd335c8ec82fe680476.tar.gz
cpython-7cae87ca7b0a3a7ce497cbd335c8ec82fe680476.tar.bz2
Patch #1550800: make exec a function.
Diffstat (limited to 'Tools/scripts/h2py.py')
-rwxr-xr-xTools/scripts/h2py.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/scripts/h2py.py b/Tools/scripts/h2py.py
index 63e7336..f4b8306 100755
--- a/Tools/scripts/h2py.py
+++ b/Tools/scripts/h2py.py
@@ -130,7 +130,7 @@ def process(fp, outfp, env = {}):
ok = 0
stmt = '%s = %s\n' % (name, body.strip())
try:
- exec stmt in env
+ exec(stmt, env)
except:
sys.stderr.write('Skipping: %s' % stmt)
else:
@@ -142,7 +142,7 @@ def process(fp, outfp, env = {}):
body = pytify(body)
stmt = 'def %s(%s): return %s\n' % (macro, arg, body)
try:
- exec stmt in env
+ exec(stmt, env)
except:
sys.stderr.write('Skipping: %s' % stmt)
else: