Fix get_operating_system_and_architecture (#9319)

_get_glibc_version() can after #9005 return either (0, 0) if glibc
string is missing or (-1, -1) if the string can't be parsed. There was
no need to change missing string to (0, 0).

Also, move back indentation to make it easier to understand.
This commit is contained in:
Jon Åslund
2024-11-21 21:05:48 +01:00
committed by GitHub
parent 55148c214e
commit a513301b7a
2 changed files with 15 additions and 17 deletions

View File

@@ -173,7 +173,7 @@ def _parse_glibc_version(version_str: str) -> tuple[int, int]:
def _get_glibc_version() -> tuple[int, int]:
version_str = _glibc_version_string()
if version_str is None:
return (0, 0)
return (-1, -1)
return _parse_glibc_version(version_str)