[Python-checkins] CVS: python/dist/src/Mac/Tools/macfreeze macgen_bin.py,1.9,1.10

Just van Rossum jvr@users.sourceforge.net
Thu, 13 Dec 2001 09:11:23 -0800


Update of /cvsroot/python/python/dist/src/Mac/Tools/macfreeze
In directory usw-pr-cvs1:/tmp/cvs-serv17222

Modified Files:
	macgen_bin.py 
Log Message:
OSX workaround: don't crash if the extentions folder can't be found.
Not sure how to properly solve this.

Index: macgen_bin.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/macfreeze/macgen_bin.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** macgen_bin.py	2001/08/25 12:06:41	1.9
--- macgen_bin.py	2001/12/13 17:11:21	1.10
***************
*** 191,196 ****
  	"""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()
  	version = string.split(sys.version)[0]
  	if MacOS.runtimemodel == 'carbon':
--- 191,200 ----
  	"""find the PythonCore shared library, possibly asking the user if we can't find it"""
  	
! 	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':