mirror of https://github.com/ARMmbed/mbed-os.git
Check for no match in version check
parent
59e8631d3a
commit
0e56c18058
|
|
@ -105,7 +105,7 @@ class ARM(mbedToolchain):
|
|||
msg = ("Compiler version mismatch: Have {}; "
|
||||
"expected version >= {} and < {}"
|
||||
.format(found_version, min_ver, max_ver))
|
||||
elif len(match.groups()) != 1:
|
||||
elif not match or len(match.groups()) != 1:
|
||||
msg = ("Compiler version mismatch: Could not detect version; "
|
||||
"expected version >= {} and < {}"
|
||||
.format(min_ver, max_ver))
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ class GCC(mbedToolchain):
|
|||
msg = ("Compiler version mismatch: Have {}; "
|
||||
"expected version >= {} and < {}"
|
||||
.format(found_version, min_ver, max_ver))
|
||||
elif len(match.groups()) != 1:
|
||||
elif not match or len(match.groups()) != 1:
|
||||
msg = ("Compiler version mismatch: Could not detect version; "
|
||||
"expected version >= {} and < {}"
|
||||
.format(min_ver, max_ver))
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ class IAR(mbedToolchain):
|
|||
if found_version and LooseVersion(found_version) != self.IAR_VERSION:
|
||||
msg = "Compiler version mismatch: Have {}; expected {}".format(
|
||||
found_version, self.IAR_VERSION)
|
||||
elif len(match.groups()) != 1:
|
||||
elif not match or len(match.groups()) != 1:
|
||||
msg = ("Compiler version mismatch: Could Not detect compiler "
|
||||
"version; expected {}".format(self.IAR_VERSION))
|
||||
if msg:
|
||||
|
|
|
|||
Loading…
Reference in New Issue