[Python-checkins] r72352 - in python/trunk: Lib/ctypes/util.py Misc/NEWS

thomas.heller python-checkins at python.org
Tue May 5 20:55:47 CEST 2009


Author: thomas.heller
Date: Tue May 5 20:55:47 2009
New Revision: 72352
Log:
Fix Issue #4875: find_library can return directories instead of files
(on win32)
Modified:
 python/trunk/Lib/ctypes/util.py
 python/trunk/Misc/NEWS
Modified: python/trunk/Lib/ctypes/util.py
==============================================================================
--- python/trunk/Lib/ctypes/util.py	(original)
+++ python/trunk/Lib/ctypes/util.py	Tue May 5 20:55:47 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/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Tue May 5 20:55:47 2009
@@ -282,6 +282,9 @@
 Library
 -------
 
+- Issue #4875: On win32, ctypes.util.find_library does no longer
+ return directories.
+
 - Issue #5142: Add the ability to skip modules while stepping to pdb.
 
 - Issue #1309567: Fix linecache behavior of stripping subdirectories when


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /