Skip to content

Commit c4c54df

Browse files
aduh95legendecas
andauthored
Apply suggestions from code review
Co-authored-by: Chengzhong Wu <cwu631@bloomberg.net>
1 parent 813d595 commit c4c54df

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pylib/gyp/xcode_emulation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,7 @@ def _DefaultSdkRoot(self):
13541354
return default_sdk_root
13551355
try:
13561356
all_sdks = GetStdout(["xcodebuild", "-showsdks"])
1357-
except (GypError, FileNotFoundError):
1357+
except (GypError, OSError):
13581358
# If xcodebuild fails, there will be no valid SDKs
13591359
return ""
13601360
for line in all_sdks.splitlines():
@@ -1508,7 +1508,7 @@ def XcodeVersion():
15081508
raise GypError("xcodebuild returned unexpected results")
15091509
version = version_list[0].split()[-1] # Last word on first line
15101510
build = version_list[-1].split()[-1] # Last word on last line
1511-
except (GypError, FileNotFoundError):
1511+
except (GypError, OSError):
15121512
# Xcode not installed so look for XCode Command Line Tools
15131513
version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
15141514
if not version:

0 commit comments

Comments
 (0)