This commit is contained in:
Kovid Goyal 2020-03-24 18:33:32 +05:30
parent a07369ce69
commit 0547102bdd
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -141,8 +141,11 @@ def cc_version() -> Tuple[str, Tuple[int, int]]:
else:
cc = 'cc'
raw = subprocess.check_output([cc, '-dumpversion']).decode('utf-8')
ver_ = raw.split('.')[:2]
ver_ = raw.strip().split('.')[:2]
try:
if len(ver_) == 1:
ver = int(ver_[0]), 0
else:
ver = int(ver_[0]), int(ver_[1])
except Exception:
ver = (0, 0)