aedi: make mypy linter happy

state.py:112: error: Item "None" of "Match[str] | None" has no attribute "group"  [union-attr]
This commit is contained in:
alexey.lysiuk 2023-12-15 16:40:05 +02:00
parent e8d8bba6ab
commit acfcef3683
1 changed files with 5 additions and 3 deletions

View File

@ -109,10 +109,12 @@ class BuildState:
version_output = subprocess.run(('clang', '--version'), check=True, capture_output=True)
version_match = re.search(r'\(clang-([\d.]+)\)', version_output.stdout.decode('ascii'))
version = StrictVersion(version_match.group(1))
if version.major == 1500 and version.minor == 0:
self._linker_flags += ' -Wl,-ld_classic'
if version_match:
version = StrictVersion(version_match.group(1))
if version.major == 1500 and version.minor == 0:
self._linker_flags += ' -Wl,-ld_classic'
return self._linker_flags