[commit: ghc] wip/python3: Replace execfile with exec(open(...)) (f74f1f5)

git at git.haskell.org git at git.haskell.org
Sat Sep 20 23:21:06 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/python3
Link       : http://ghc.haskell.org/trac/ghc/changeset/f74f1f52f08ef543ef84ace6188f0354a121600b/ghc

>---------------------------------------------------------------

commit f74f1f52f08ef543ef84ace6188f0354a121600b
Author: Krzysztof Gogolewski <krz.gogolewski at gmail.com>
Date:   Sat Sep 20 17:59:53 2014 +0200

    Replace execfile with exec(open(...))


>---------------------------------------------------------------

f74f1f52f08ef543ef84ace6188f0354a121600b
 testsuite/driver/runtests.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py
index 5283c9a..fcff225 100644
--- a/testsuite/driver/runtests.py
+++ b/testsuite/driver/runtests.py
@@ -54,7 +54,7 @@ opts, args = getopt.getopt(sys.argv[1:], "e:", long_options)
        
 for opt,arg in opts:
     if opt == '--config':
-        exec(compile(open(arg).read(), arg, 'exec'))
+        exec(open(arg).read())
 
     # -e is a string to execute from the command line.  For example:
     # testframe -e 'config.compiler=ghc-5.04'
@@ -262,7 +262,7 @@ for file in t_files:
     if_verbose(2, '====> Scanning %s' % file)
     newTestDir(os.path.dirname(file))
     try:
-        exec(compile(open(file).read(), arg, 'exec'))
+        exec(open(file).read())
     except:
         print('*** framework failure: found an error while executing ', file, ':')
         t.n_framework_failures = t.n_framework_failures + 1



More information about the ghc-commits mailing list