From: Just van Rossum <just@letterror.com>
Date: Mon, 6 Jan 2003 11:15:05 +0000 (+0000)
Subject: always also search on sys.path for res files
X-Git-Tag: v2.3c1~2576
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=077c5823d11f6e11f97d3c1d412a6622d953ec6f;p=python

always also search on sys.path for res files
---

diff --git a/Lib/plat-mac/macresource.py b/Lib/plat-mac/macresource.py
index 26f909409f..7e99c00a69 100644
--- a/Lib/plat-mac/macresource.py
+++ b/Lib/plat-mac/macresource.py
@@ -49,9 +49,8 @@ def need(restype, resid, filename=None, modname=None):
 	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: