Skip to content

Commit d06d345

Browse files
mingwandroidned-deily
authored andcommitted
bpo-33281: Fix ctypes.util.find_library regression on macOS (GH-6625)
1 parent ef34753 commit d06d345

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/ctypes/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def find_library(name):
6767
return fname
6868
return None
6969

70-
if os.name == "posix" and sys.platform == "darwin":
70+
elif os.name == "posix" and sys.platform == "darwin":
7171
from ctypes.macholib.dyld import dyld_find as _dyld_find
7272
def find_library(name):
7373
possible = ['lib%s.dylib' % name,
@@ -80,7 +80,7 @@ def find_library(name):
8080
continue
8181
return None
8282

83-
if sys.platform.startswith("aix"):
83+
elif sys.platform.startswith("aix"):
8484
# AIX has two styles of storing shared libraries
8585
# GNU auto_tools refer to these as svr4 and aix
8686
# svr4 (System V Release 4) is a regular file, often with .so as suffix

0 commit comments

Comments
 (0)