summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-10-29 22:12:30 +0000
committerng0 <ng0@n0.is>2019-10-29 22:12:30 +0000
commit2536801927781ea38fefc3de924934e1c6a74d88 (patch)
treec310306bcd2476950616128425fac333a23fde2e
parent426b0a9cf04cf1712c7bd644ee6c1d74caf97917 (diff)
downloadtaler-build-scripts-master.tar.gz
taler-build-scripts-master.tar.bz2
taler-build-scripts-master.zip
use shlex.split()HEADmaster
-rw-r--r--talerbuildconfig.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/talerbuildconfig.py b/talerbuildconfig.py
index cdc5774..da063b9 100644
--- a/talerbuildconfig.py
+++ b/talerbuildconfig.py
@@ -23,6 +23,7 @@ from abc import ABC
import argparse
import os
import sys
+import shlex
import logging
from distutils.spawn import find_executable
import subprocess
@@ -234,11 +235,11 @@ class PythonTool(Tool):
def check(self, buildconfig):
# No suffix. Would probably be cheaper to do this in
# the dict as well. We need at least version 3.7.
- if existence("python") and (subprocess.check_output(["python", "--version"]).split()[1] >= b'3.7'):
+ if existence("python") and (shlex.split(subprocess.getstatusoutput("python --version")[1])[1] >= '3.7'):
# python might not be python3. It might not even be
# python 3.x.
- python_version = subprocess.check_output(["python", "--version"]).split()[1]
- if python_version >= b'3.7':
+ python_version = shlex.split(subprocess.getstatusoutput("python --version")[1])[1]
+ if python_version >= '3.7':
buildconfig._set_tool("python", "python", python_version)
return True
else: