summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2009-05-05 19:04:40 (GMT)
committerThomas Heller <theller@ctypes.org>2009-05-05 19:04:40 (GMT)
commit00cfc379d66c056ed5ac5a9df5b75c86f3fc7fbe (patch)
tree21788069f02f1349de12002d495291a280d4e174 /Lib
parent690ce9b353bc0a86d0886470adbaa50e813de3b8 (diff)
downloadcpython-00cfc379d66c056ed5ac5a9df5b75c86f3fc7fbe.zip
cpython-00cfc379d66c056ed5ac5a9df5b75c86f3fc7fbe.tar.gz
cpython-00cfc379d66c056ed5ac5a9df5b75c86f3fc7fbe.tar.bz2
Merged revisions 72352 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72352 | thomas.heller | 2009-05-05 20:55:47 +0200 (Di, 05 Mai 2009) | 3 lines Fix Issue #4875: find_library can return directories instead of files (on win32) ........
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ctypes/util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
index 37e4b03..794b895 100644
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
@@ -49,12 +49,12 @@ if os.name == "nt":
# See MSDN for the REAL search order.
for directory in os.environ['PATH'].split(os.pathsep):
fname = os.path.join(directory, name)
- if os.path.exists(fname):
+ if os.path.isfile(fname):
return fname
if fname.lower().endswith(".dll"):
continue
fname = fname + ".dll"
- if os.path.exists(fname):
+ if os.path.isfile(fname):
return fname
return None