Skip to content

Commit fd155e0

Browse files
authored
Update xcode_emulation.py
1 parent c4c54df commit fd155e0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pylib/gyp/xcode_emulation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ def _GetSdkVersionInfoItem(self, sdk, infoitem):
521521
# most sensible route and should still do the right thing.
522522
try:
523523
return GetStdoutQuiet(["xcrun", "--sdk", sdk, infoitem])
524-
except GypError:
524+
except (GypError, OSError):
525525
pass
526526

527527
def _SdkRoot(self, configname):
@@ -1542,14 +1542,14 @@ def CLTVersion():
15421542
try:
15431543
output = GetStdout(["/usr/sbin/pkgutil", "--pkg-info", key])
15441544
return re.search(regex, output).groupdict()["version"]
1545-
except GypError:
1545+
except (GypError, OSError):
15461546
continue
15471547

15481548
regex = re.compile(r"Command Line Tools for Xcode\s+(?P<version>\S+)")
15491549
try:
15501550
output = GetStdout(["/usr/sbin/softwareupdate", "--history"])
15511551
return re.search(regex, output).groupdict()["version"]
1552-
except GypError:
1552+
except (GypError, OSError):
15531553
return None
15541554

15551555

0 commit comments

Comments
 (0)