diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-08-20 09:30:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-20 09:30:01 +0200 |
commit | 789d1f2e078e58fe15e090e0082a9db98b3405f7 (patch) | |
tree | fbf2212a1fa5747d980e2b17088e8f6e3c803603 | |
parent | 4723f7fe4d30a882e8cbb7ca113f66c8b1dce8ae (diff) | |
parent | c6a4ca5c9e8c7c9c4c3fd3140bf8b1fc97f5cbfc (diff) |
Merge pull request #21208 from jmca/master
Prevent "cannot use a string pattern on a bytes-like object"
-rw-r--r-- | modules/mono/config.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/mono/config.py b/modules/mono/config.py index c4f8dcfde8..70fd1a35f1 100644 --- a/modules/mono/config.py +++ b/modules/mono/config.py @@ -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: |