From 0441dbff16bc7d0528b8f8f96e164350e58101f8 Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Thu, 13 Dec 2001 17:11:21 +0000 Subject: OSX workaround: don't crash if the extentions folder can't be found. Not sure how to properly solve this. --- Mac/Tools/macfreeze/macgen_bin.py | 8 ++++++-- 1 file 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 -- cgit v0.12