summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/finish-swig-Python-LLDB.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/scripts/Python/finish-swig-Python-LLDB.sh')
-rwxr-xr-xlldb/scripts/Python/finish-swig-Python-LLDB.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/scripts/Python/finish-swig-Python-LLDB.sh b/lldb/scripts/Python/finish-swig-Python-LLDB.sh
index 31bc2b349da..1cd17744a70 100755
--- a/lldb/scripts/Python/finish-swig-Python-LLDB.sh
+++ b/lldb/scripts/Python/finish-swig-Python-LLDB.sh
@@ -56,8 +56,7 @@ fi
OS_NAME=`uname -s`
PYTHON=${PYTHON_EXECUTABLE:-/usr/bin/env python}
-PYTHON_VERSION=`${PYTHON} --version 2>&1 | sed -e 's,Python ,,' -e 's,[.][0-9],,2' -e 's,[a-z][a-z][0-9],,'`
-
+PYTHON_VERSION=`${PYTHON} -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))'`
if [ $Debug -eq 1 ]
then
OpenPOWER on IntegriCloud