summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac/macresource.py
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2003-01-06 11:15:05 (GMT)
committerJust van Rossum <just@letterror.com>2003-01-06 11:15:05 (GMT)
commit077c5823d11f6e11f97d3c1d412a6622d953ec6f (patch)
tree73d08d3d5a08acd0027c3aa21162df4bddde700b /Lib/plat-mac/macresource.py
parent698258a1991db03207353b8403bfff1287ba92cc (diff)
downloadcpython-077c5823d11f6e11f97d3c1d412a6622d953ec6f.zip
cpython-077c5823d11f6e11f97d3c1d412a6622d953ec6f.tar.gz
cpython-077c5823d11f6e11f97d3c1d412a6622d953ec6f.tar.bz2
always also search on sys.path for res files
Diffstat (limited to 'Lib/plat-mac/macresource.py')
-rw-r--r--Lib/plat-mac/macresource.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/plat-mac/macresource.py b/Lib/plat-mac/macresource.py
index 26f90940..7e99c00 100644
--- a/Lib/plat-mac/macresource.py
+++ b/Lib/plat-mac/macresource.py
@@ -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: