We should look in the directory containing the module, not in the module itself, when we're looking for the resource file.

This commit is contained in:
Jack Jansen 2001-08-30 21:19:42 +00:00
parent eb9f384c28
commit b214c36d0a
1 changed files with 1 additions and 1 deletions

View 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