Skip to content

Commit 149d280

Browse files
Cruz Monrreal IICruz Monrreal II
authored andcommitted
Added encoding to version check for Py3 compat
1 parent cc31141 commit 149d280

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tools/toolchains/arm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def version_check(self):
102102
stdout, _, retcode = run_cmd([self.cc[0], "--vsn"], redirect=True)
103103
msg = None
104104
min_ver, max_ver = self.ARMCC_RANGE
105-
match = self.ARMCC_VERSION_RE.search(stdout)
105+
match = self.ARMCC_VERSION_RE.search(stdout.encode("utf-8"))
106106
found_version = LooseVersion(match.group(1).decode("utf-8")) if match else None
107107
min_ver, max_ver = self.ARMCC_RANGE
108108
if found_version and (found_version < min_ver or found_version >= max_ver):

tools/toolchains/gcc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def __init__(self, target, notify=None, macros=None, build_profile=None,
133133
def version_check(self):
134134
stdout, _, retcode = run_cmd([self.cc[0], "--version"], redirect=True)
135135
msg = None
136-
match = self.GCC_VERSION_RE.search(stdout)
136+
match = self.GCC_VERSION_RE.search(stdout.encode("utf-8"))
137137
found_version = LooseVersion(match.group(0).decode('utf-8')) if match else None
138138
min_ver, max_ver = self.GCC_RANGE
139139
if found_version and (found_version < min_ver or found_version >= max_ver):

tools/toolchains/iar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def __init__(self, target, notify=None, macros=None, build_profile=None,
9999
def version_check(self):
100100
stdout, _, retcode = run_cmd([self.cc[0], "--version"], redirect=True)
101101
msg = None
102-
match = self.IAR_VERSION_RE.search(stdout)
102+
match = self.IAR_VERSION_RE.search(stdout.encode("utf-8"))
103103
found_version = match.group(1).decode("utf-8") if match else None
104104
if found_version and LooseVersion(found_version) != self.IAR_VERSION:
105105
msg = "Compiler version mismatch: Have {}; expected {}".format(

0 commit comments

Comments
 (0)