[Python-checkins] r72353 - in python/branches/release26-maint: Lib/ctypes/util.py Misc/NEWS

thomas.heller python-checkins at python.org
Tue May 5 20:59:30 CEST 2009


Author: thomas.heller
Date: Tue May  5 20:59:30 2009
New Revision: 72353

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


Modified:
   python/branches/release26-maint/   (props changed)
   python/branches/release26-maint/Lib/ctypes/util.py
   python/branches/release26-maint/Misc/NEWS

Modified: python/branches/release26-maint/Lib/ctypes/util.py
==============================================================================
--- python/branches/release26-maint/Lib/ctypes/util.py	(original)
+++ python/branches/release26-maint/Lib/ctypes/util.py	Tue May  5 20:59:30 2009
@@ -52,12 +52,12 @@
         # 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
 

Modified: python/branches/release26-maint/Misc/NEWS
==============================================================================
--- python/branches/release26-maint/Misc/NEWS	(original)
+++ python/branches/release26-maint/Misc/NEWS	Tue May  5 20:59:30 2009
@@ -40,6 +40,9 @@
 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.
 


More information about the Python-checkins mailing list