Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 00cfc37

Browse files
author
Thomas Heller
committed
Merged revisions 72352 via svnmerge from
svn+ssh://[email protected]/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) ........
1 parent 690ce9b commit 00cfc37

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

Lib/ctypes/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ def find_library(name):
4949
# See MSDN for the REAL search order.
5050
for directory in os.environ['PATH'].split(os.pathsep):
5151
fname = os.path.join(directory, name)
52-
if os.path.exists(fname):
52+
if os.path.isfile(fname):
5353
return fname
5454
if fname.lower().endswith(".dll"):
5555
continue
5656
fname = fname + ".dll"
57-
if os.path.exists(fname):
57+
if os.path.isfile(fname):
5858
return fname
5959
return None
6060

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ Installation
127127
Library
128128
-------
129129

130+
- Issue #4875: On win32, ctypes.util.find_library does no longer
131+
return directories.
132+
130133
- Issue #5142: Add the ability to skip modules while stepping to pdb.
131134

132135
- Issue #1309567: Fix linecache behavior of stripping subdirectories when

0 commit comments

Comments
 (0)