Kaydet (Commit) 077c5823 authored tarafından Just van Rossum's avatar Just van Rossum

always also search on sys.path for res files

üst 698258a1
......@@ -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:
......
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