summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2001-12-13 17:11:21 (GMT)
committerJust van Rossum <just@letterror.com>2001-12-13 17:11:21 (GMT)
commit0441dbff16bc7d0528b8f8f96e164350e58101f8 (patch)
treebf43459fc10ede0deda367bd2098009be6e17b9b /Mac
parente9039b1742d8bac6a53cfac6ae67f8e1c7a8741c (diff)
downloadcpython-0441dbff16bc7d0528b8f8f96e164350e58101f8.zip
cpython-0441dbff16bc7d0528b8f8f96e164350e58101f8.tar.gz
cpython-0441dbff16bc7d0528b8f8f96e164350e58101f8.tar.bz2
OSX workaround: don't crash if the extentions folder can't be found.
Not sure how to properly solve this.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Tools/macfreeze/macgen_bin.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Mac/Tools/macfreeze/macgen_bin.py b/Mac/Tools/macfreeze/macgen_bin.py
index c72bb3c..a6de84a 100644
--- a/Mac/Tools/macfreeze/macgen_bin.py
+++ b/Mac/Tools/macfreeze/macgen_bin.py
@@ -190,8 +190,12 @@ def copyres(input, output, *args, **kwargs):
def findpythoncore():
"""find the PythonCore shared library, possibly asking the user if we can't find it"""
- vRefNum, dirID = macfs.FindFolder(kOnSystemDisk, kSharedLibrariesFolderType, 0)
- extpath = macfs.FSSpec((vRefNum, dirID, "")).as_pathname()
+ try:
+ vRefNum, dirID = macfs.FindFolder(kOnSystemDisk, kSharedLibrariesFolderType, 0)
+ except macfs.error:
+ extpath = ":"
+ else:
+ extpath = macfs.FSSpec((vRefNum, dirID, "")).as_pathname()
version = string.split(sys.version)[0]
if MacOS.runtimemodel == 'carbon':
corename = "PythonCoreCarbon " + version