Prevent "cannot use a string pattern on a bytes-like object"
Fixes #21207
This commit is contained in:
parent
faa49c1829
commit
c6a4ca5c9e
|
@ -265,11 +265,13 @@ def pkgconfig_try_find_mono_root(mono_lib_names, sharedlib_ext):
|
||||||
|
|
||||||
|
|
||||||
def pkgconfig_try_find_mono_version():
|
def pkgconfig_try_find_mono_version():
|
||||||
|
from compat import decode_utf8
|
||||||
|
|
||||||
lines = subprocess.check_output(['pkg-config', 'monosgen-2', '--modversion']).splitlines()
|
lines = subprocess.check_output(['pkg-config', 'monosgen-2', '--modversion']).splitlines()
|
||||||
greater_version = None
|
greater_version = None
|
||||||
for line in lines:
|
for line in lines:
|
||||||
try:
|
try:
|
||||||
version = LooseVersion(line)
|
version = LooseVersion(decode_utf8(line))
|
||||||
if greater_version is None or version > greater_version:
|
if greater_version is None or version > greater_version:
|
||||||
greater_version = version
|
greater_version = version
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
|
Loading…
Reference in New Issue