]> granicus.if.org Git - python/commitdiff
always also search on sys.path for res files
authorJust van Rossum <just@letterror.com>
Mon, 6 Jan 2003 11:15:05 +0000 (11:15 +0000)
committerJust van Rossum <just@letterror.com>
Mon, 6 Jan 2003 11:15:05 +0000 (11:15 +0000)
Lib/plat-mac/macresource.py

index 26f909409faa4c30d5a23dccdce908fbf550d541..7e99c00a695694d72eecc79c38ea0c7767e96831 100644 (file)
@@ -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: