Commit 4d0e07f7 authored by Jonas Devlieghere's avatar Jonas Devlieghere
Browse files

[lldb] Make Asan/SIP workaround work for Python 3

Make the check generic instead of hard-coding the path to Python 2. This
also fixes the print-syntax to be compatible with both versions.
parent 6b44a41f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -79,8 +79,10 @@ class LLDBTest(TestFormat):
            if not os.path.isfile(copied_python):
                import shutil, subprocess
                python = subprocess.check_output([
                    '/usr/bin/python2.7', '-c',
                    'import sys; print sys.executable']).strip()
                    sys.executable,
                    '-c',
                    'import sys; print(sys.executable)'
                ]).decode('utf-8').strip()
                shutil.copy(python, copied_python)
            cmd[0] = copied_python