Kaydet (Commit) b214c36d authored tarafından Jack Jansen's avatar Jack Jansen

We should look in the directory containing the module, not in the module itself,…

We should look in the directory containing the module, not in the module itself, when we're looking for the resource file.
üst eb9f384c
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment