[Python-checkins] CVS: python/dist/src/Mac/Lib macresource.py,1.2,1.3

Jack Jansen jackjansen@users.sourceforge.net
Thu, 30 Aug 2001 14:19:44 -0700


Update of /cvsroot/python/python/dist/src/Mac/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv16160/Python/Mac/Lib

Modified Files:
	macresource.py 
Log Message:
We should look in the directory containing the module, not in the module itself, when we're looking for the resource file.

Index: macresource.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Lib/macresource.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** macresource.py	2001/08/27 21:37:45	1.2
--- macresource.py	2001/08/30 21:19:42	1.3
***************
*** 50,54 ****
  		mod = sys.modules[modname]
  		if hasattr(mod, '__file__'):
! 			searchdirs = [mod.__file__]
  	if not searchdirs:
  		searchdirs = sys.path
--- 50,54 ----
  		mod = sys.modules[modname]
  		if hasattr(mod, '__file__'):
! 			searchdirs = [os.path.split(mod.__file__)[0]]
  	if not searchdirs:
  		searchdirs = sys.path