diff options
author | Jose <jose@zeroc.com> | 2021-01-19 11:21:35 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2021-01-19 11:21:35 +0100 |
commit | 2411d5c50d8bbc5309095be1f88675220b7f8635 (patch) | |
tree | d4c55ae2c50069809ac8085bcac77c731f6d2533 /scripts/Util.py | |
parent | Add getPythonVersion to PythonMapping.Config (diff) | |
download | ice-2411d5c50d8bbc5309095be1f88675220b7f8635.tar.bz2 ice-2411d5c50d8bbc5309095be1f88675220b7f8635.tar.xz ice-2411d5c50d8bbc5309095be1f88675220b7f8635.zip |
Do not use text=True in subprocess.check_output this is not widely supported
Diffstat (limited to 'scripts/Util.py')
-rw-r--r-- | scripts/Util.py | 5 |
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 |