diff options
Diffstat (limited to 'Mac/Tools')
-rw-r--r-- | Mac/Tools/macfreeze/macgen_bin.py | 8 |
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 |