From 7cae87ca7b0a3a7ce497cbd335c8ec82fe680476 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 6 Sep 2006 06:51:57 +0000 Subject: Patch #1550800: make exec a function. --- Tools/scripts/h2py.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Tools/scripts/h2py.py') diff --git a/Tools/scripts/h2py.py b/Tools/scripts/h2py.py index 63e7336f9f9..f4b83066e2d 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: -- cgit v1.2.3