We should look in the directory containing the module, not in the module itself,...
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 30 Aug 2001 21:19:42 +0000 (21:19 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 30 Aug 2001 21:19:42 +0000 (21:19 +0000)
Mac/Lib/macresource.py

index 9b442a8cd2e393659d401ddb4012ba5cf390a3d5..001e6cc7bb69f69121e5e262f88d9b45b094e880 100644 (file)
@@ -49,7 +49,7 @@ def need(restype, resid, filename=None, modname=None):
        if sys.modules.has_key(modname):
                mod = sys.modules[modname]
                if hasattr(mod, '__file__'):
-                       searchdirs = [mod.__file__]
+                       searchdirs = [os.path.split(mod.__file__)[0]]
        if not searchdirs:
                searchdirs = sys.path