diff options
| author | Guido van Rossum <guido@python.org> | 1997-10-01 22:10:32 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1997-10-01 22:10:32 +0000 |
| commit | f1b0009a7807e18fad3e2e17c8cb3b4a4eb20b07 (patch) | |
| tree | 757d9d09a549642a53cfa8345da1c090723924a5 /Lib/test/test_imageop.py | |
| parent | 88d8beec0a1196fd33332fe18e893dae796dc505 (diff) | |
| download | cpython-git-f1b0009a7807e18fad3e2e17c8cb3b4a4eb20b07.tar.gz | |
Fix path search for test data file so it works under more circumstances.
Diffstat (limited to 'Lib/test/test_imageop.py')
| -rwxr-xr-x | Lib/test/test_imageop.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_imageop.py b/Lib/test/test_imageop.py index 77281ab52b..89b111cf2b 100755 --- a/Lib/test/test_imageop.py +++ b/Lib/test/test_imageop.py @@ -155,7 +155,12 @@ def get_qualified_path(name): """ return a more qualified path to name""" import sys import os - for dir in sys.path: + path = sys.path + try: + path = [os.path.dirname(__file__)] + path + except NameError: + pass + for dir in path: fullname = os.path.join(dir, name) if os.path.exists(fullname): return fullname |
