summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2009-05-05 18:59:30 +0000
committerThomas Heller <theller@ctypes.org>2009-05-05 18:59:30 +0000
commit54e024862a09bda1c30b721c2f1dcac7f45ca69a (patch)
tree96cd62d6ad32d6f34255bdd778b8bdbfaca2a875
parent04e190779b1c6a5f36ad12a2009ad078cf4944d5 (diff)
downloadcpython-git-54e024862a09bda1c30b721c2f1dcac7f45ca69a.tar.gz
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) ........
-rw-r--r--Lib/ctypes/util.py4
-rw-r--r--Misc/NEWS3
2 files changed, 5 insertions, 2 deletions
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
index 433d0d9bf6..35b0b1e50e 100644
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
@@ -52,12 +52,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
diff --git a/Misc/NEWS b/Misc/NEWS
index 69078c11a1..f5c7a5e5a0 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -40,6 +40,9 @@ Core and Builtins
Library
-------
+- Issue #4875: On win32, ctypes.util.find_library does no longer
+ return directories.
+
- Issue #5692: In :class:`zipfile.Zipfile`, fix wrong path calculation when
extracting a file to the root directory.