mirror of https://github.com/ARMmbed/mbed-os.git
Added encoding to version check for Py3 compat
parent
cc3114113d
commit
149d280e7a
|
@ -102,7 +102,7 @@ class ARM(mbedToolchain):
|
|||
stdout, _, retcode = run_cmd([self.cc[0], "--vsn"], redirect=True)
|
||||
msg = None
|
||||
min_ver, max_ver = self.ARMCC_RANGE
|
||||
match = self.ARMCC_VERSION_RE.search(stdout)
|
||||
match = self.ARMCC_VERSION_RE.search(stdout.encode("utf-8"))
|
||||
found_version = LooseVersion(match.group(1).decode("utf-8")) if match else None
|
||||
min_ver, max_ver = self.ARMCC_RANGE
|
||||
if found_version and (found_version < min_ver or found_version >= max_ver):
|
||||
|
|
|
@ -133,7 +133,7 @@ class GCC(mbedToolchain):
|
|||
def version_check(self):
|
||||
stdout, _, retcode = run_cmd([self.cc[0], "--version"], redirect=True)
|
||||
msg = None
|
||||
match = self.GCC_VERSION_RE.search(stdout)
|
||||
match = self.GCC_VERSION_RE.search(stdout.encode("utf-8"))
|
||||
found_version = LooseVersion(match.group(0).decode('utf-8')) if match else None
|
||||
min_ver, max_ver = self.GCC_RANGE
|
||||
if found_version and (found_version < min_ver or found_version >= max_ver):
|
||||
|
|
|
@ -99,7 +99,7 @@ class IAR(mbedToolchain):
|
|||
def version_check(self):
|
||||
stdout, _, retcode = run_cmd([self.cc[0], "--version"], redirect=True)
|
||||
msg = None
|
||||
match = self.IAR_VERSION_RE.search(stdout)
|
||||
match = self.IAR_VERSION_RE.search(stdout.encode("utf-8"))
|
||||
found_version = match.group(1).decode("utf-8") if match else None
|
||||
if found_version and LooseVersion(found_version) != self.IAR_VERSION:
|
||||
msg = "Compiler version mismatch: Have {}; expected {}".format(
|
||||
|
|
Loading…
Reference in New Issue