]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 72354 via svnmerge from
authorThomas Heller <theller@ctypes.org>
Tue, 5 May 2009 19:33:26 +0000 (19:33 +0000)
committerThomas Heller <theller@ctypes.org>
Tue, 5 May 2009 19:33:26 +0000 (19:33 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r72354 | thomas.heller | 2009-05-05 21:04:40 +0200 (Di, 05 Mai 2009) | 10 lines

  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)
  ........
................

Lib/ctypes/util.py
Misc/NEWS

index 37e4b037ec4e29a1aec3408459ed6cb13486e186..794b895aa064898c35b6c990341ff16b3478a8ba 100644 (file)
@@ -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
 
index ad550e87b5bb158ce491ad8ac8cf351f08073c43..2f9d99e0bfb5eb94798297e3fef998c5763ba5c2 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -55,6 +55,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #4875: On win32, ctypes.util.find_library does no longer
+  return directories.
+
 - Issue #2245: aifc now skips chunk types it doesn't recognize, per spec.
 
 - Issue #4305: ctypes should now build again on mipsel-linux-gnu