[Lldb-commits] [lldb] r252347 - Python 3 - Use the exec function, not the exec statement.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 6 13:37:22 PST 2015


Author: zturner
Date: Fri Nov  6 15:37:21 2015
New Revision: 252347

URL: http://llvm.org/viewvc/llvm-project?rev=252347&view=rev
Log:
Python 3 - Use the exec function, not the exec statement.

exec statement is gone in Python 3, this version works in both.

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py
    lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py?rev=252347&r1=252346&r2=252347&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py Fri Nov  6 15:37:21 2015
@@ -1,3 +1,5 @@
-import lldbsuite.test.lldbinline as lldbinline
+from __future__ import absolute_import
+
+from lldbsuite.test import lldbinline
 
 lldbinline.MakeInlineTest(__file__, globals(), [lldbinline.expectedFailureWindows("llvm.org/pr24663")])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py?rev=252347&r1=252346&r2=252347&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py Fri Nov  6 15:37:21 2015
@@ -141,7 +141,7 @@ class InlineTest(TestBase):
         self.do_test()
 
     def execute_user_command(self, __command):
-        exec __command in globals(), locals()
+        exec(__command, globals(), locals())
 
     def do_test(self):
         exe_name = "a.out"




More information about the lldb-commits mailing list