[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.
This commit is contained in:
parent
6b44a41fef
commit
4d0e07f786
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue