summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2021-01-19 11:21:35 +0100
committerJose <jose@zeroc.com>2021-01-19 11:21:35 +0100
commit2411d5c50d8bbc5309095be1f88675220b7f8635 (patch)
treed4c55ae2c50069809ac8085bcac77c731f6d2533
parentAdd getPythonVersion to PythonMapping.Config (diff)
downloadice-2411d5c50d8bbc5309095be1f88675220b7f8635.tar.bz2
ice-2411d5c50d8bbc5309095be1f88675220b7f8635.tar.xz
ice-2411d5c50d8bbc5309095be1f88675220b7f8635.zip
Do not use text=True in subprocess.check_output this is not widely supported
-rw-r--r--scripts/Util.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/Util.py b/scripts/Util.py
index 92a8427c65f..21dd5464ae9 100644
--- a/scripts/Util.py
+++ b/scripts/Util.py
@@ -3695,8 +3695,9 @@ class PythonMapping(CppBasedMapping):
version = subprocess.check_output(
[currentConfig.python,
"-c",
- "import sys; print(\"{0}.{1}\".format(sys.version_info[0], sys.version_info[1]))"],
- text=True)
+ "import sys; print(\"{0}.{1}\".format(sys.version_info[0], sys.version_info[1]))"])
+ if type(version) != str:
+ version = version.decode("utf-8")
self.pythonVersion = tuple(int(num) for num in version.split("."))
return self.pythonVersion