summaryrefslogtreecommitdiffstats
path: root/lldb/examples/python/memory.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/examples/python/memory.py')
-rwxr-xr-xlldb/examples/python/memory.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/lldb/examples/python/memory.py b/lldb/examples/python/memory.py
index d2bc60cb10f..9f8f7e384c4 100755
--- a/lldb/examples/python/memory.py
+++ b/lldb/examples/python/memory.py
@@ -15,11 +15,7 @@ import platform
import os
import re
import sys
-
-if sys.version_info.major == 2:
- import commands as subprocess
-else:
- import subprocess
+import subprocess
try:
# Just try for LLDB in case PYTHONPATH is already correctly setup
@@ -30,7 +26,7 @@ except ImportError:
platform_system = platform.system()
if platform_system == 'Darwin':
# On Darwin, try the currently selected Xcode directory
- xcode_dir = subprocess.getoutput("xcode-select --print-path")
+ xcode_dir = subprocess.check_output("xcode-select --print-path", shell=True)
if xcode_dir:
lldb_python_dirs.append(
os.path.realpath(
OpenPOWER on IntegriCloud