Merge pull request #21208 from jmca/master

Prevent "cannot use a string pattern on a bytes-like object"
This commit is contained in:
Rémi Verschelde 2018-08-20 09:30:01 +02:00 committed by GitHub
commit 789d1f2e07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -265,11 +265,13 @@ def pkgconfig_try_find_mono_root(mono_lib_names, sharedlib_ext):
def pkgconfig_try_find_mono_version():
from compat import decode_utf8
lines = subprocess.check_output(['pkg-config', 'monosgen-2', '--modversion']).splitlines()
greater_version = None
for line in lines:
try:
version = LooseVersion(line)
version = LooseVersion(decode_utf8(line))
if greater_version is None or version > greater_version:
greater_version = version
except ValueError: