From b68c14ff5a38243ca559d13cec94ba2478a89cf1 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Wed, 17 Jul 2013 14:37:21 -0400
Subject: [PATCH] Use Py3-compatible exec() calls

---
 pytools/__init__.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pytools/__init__.py b/pytools/__init__.py
index 8be65a6..50b4f7c 100644
--- a/pytools/__init__.py
+++ b/pytools/__init__.py
@@ -1288,9 +1288,9 @@ class CPyUserInterface(object):
         import os
         for arg in argv[1:]:
             if os.access(arg, os.F_OK):
-                exec open(arg, "r") in execenv
+                exec(compile(open(arg, "r"), arg, 'exec'), execenv)
             else:
-                exec arg in execenv
+                exec(compile(arg, "<command line>", 'exec'), execenv)
 
         # check if the user set invalid keys
         for added_key in (
-- 
GitLab