check gitver is castable before casting to int

This commit is contained in:
Robert Stancil
2025-09-14 17:24:19 -05:00
committed by lorenz
parent 8afd36b596
commit b97609a78a

View File

@@ -44,7 +44,7 @@ if sys.version_info[0] == 3 and sys.version_info[1] >= 11:
gitver = ver[3].split()
if gitver:
gitver = gitver[0]
if gitver and gitver != "Unknown":
if gitver and gitver != "Unknown" and gitver.isdigit():
gitver = int(gitver)
else:
# If we don't have the git version, assume it's OK.