changeset 27102:69331fac4ef2 legacy-trunk

always also search on sys.path for res files
author Just van Rossum <just@letterror.com>
date Mon, 06 Jan 2003 11:15:05 +0000
parents 6d7daa5329c6
children 4306c665f857
files Lib/plat-mac/macresource.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Lib/plat-mac/macresource.py	Mon Jan 06 10:33:56 2003 +0000
+++ b/Lib/plat-mac/macresource.py	Mon Jan 06 11:15:05 2003 +0000
@@ -49,9 +49,8 @@
 	if sys.modules.has_key(modname):
 		mod = sys.modules[modname]
 		if hasattr(mod, '__file__'):
-			searchdirs = [os.path.split(mod.__file__)[0]]
-	if not searchdirs:
-		searchdirs = sys.path
+			searchdirs = [os.path.dirname(mod.__file__)]
+	searchdirs.extend(sys.path)
 	
 	# And look for the file
 	for dir in searchdirs: