[LNT] r372474 - [LNT] Python 3 support: Fix exec syntax

Thomas Preud'homme via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 21 08:07:09 PDT 2019


Author: thopre
Date: Sat Sep 21 08:07:09 2019
New Revision: 372474

URL: http://llvm.org/viewvc/llvm-project?rev=372474&view=rev
Log:
[LNT] Python 3 support: Fix exec syntax

Replace python2-specific exec statements with calls to exec builtins.
This was produced by running futurize's stage1 lib2to3.fixes.fix_exec.

Reviewers: cmatthews, hubert.reinterpretcast, kristof.beyls

Reviewed By: hubert.reinterpretcast

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D67808

Modified:
    lnt/trunk/lnt/tests/nt.py

Modified: lnt/trunk/lnt/tests/nt.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/tests/nt.py?rev=372474&r1=372473&r2=372474&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/nt.py (original)
+++ lnt/trunk/lnt/tests/nt.py Sat Sep 21 08:07:09 2019
@@ -543,7 +543,7 @@ def execute_test_modules(test_log, test_
         module_path = os.path.join(test_path, 'TestModule')
         module_file = open(module_path)
         try:
-            exec module_file in locals, globals
+            exec(module_file, locals, globals)
         except Exception:
             info = traceback.format_exc()
             fatal("unable to import test module: %r\n%s" % (




More information about the llvm-commits mailing list