[Python-checkins] python/dist/src/Lib/plat-mac macresource.py,1.1,1.2

jvr@users.sourceforge.net jvr@users.sourceforge.net
Mon, 06 Jan 2003 03:15:09 -0800


Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1:/tmp/cvs-serv11372

Modified Files:
	macresource.py 
Log Message:
always also search on sys.path for res files

Index: macresource.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/macresource.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** macresource.py	30 Dec 2002 22:04:20 -0000	1.1
--- macresource.py	6 Jan 2003 11:15:05 -0000	1.2
***************
*** 50,56 ****
  		mod = sys.modules[modname]
  		if hasattr(mod, '__file__'):
! 			searchdirs = [os.path.split(mod.__file__)[0]]
! 	if not searchdirs:
! 		searchdirs = sys.path
  	
  	# And look for the file
--- 50,55 ----
  		mod = sys.modules[modname]
  		if hasattr(mod, '__file__'):
! 			searchdirs = [os.path.dirname(mod.__file__)]
! 	searchdirs.extend(sys.path)
  	
  	# And look for the file