summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRay Donnelly <mingw.android@gmail.com>2018-05-02 02:31:36 (GMT)
committerNed Deily <nad@python.org>2018-05-02 02:31:36 (GMT)
commitd06d345f04b3f7e5b318df69b1d179328a64ca9c (patch)
tree5d19508a38a53d05edf4e1a59afb2b362fc956a5 /Lib
parentef347535f289baad22c0601e12a36b2dcd155c3a (diff)
downloadcpython-d06d345f04b3f7e5b318df69b1d179328a64ca9c.zip
cpython-d06d345f04b3f7e5b318df69b1d179328a64ca9c.tar.gz
cpython-d06d345f04b3f7e5b318df69b1d179328a64ca9c.tar.bz2
bpo-33281: Fix ctypes.util.find_library regression on macOS (GH-6625)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ctypes/util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
index 5e8b31a..97973bc 100644
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
@@ -67,7 +67,7 @@ if os.name == "nt":
return fname
return None
-if os.name == "posix" and sys.platform == "darwin":
+elif os.name == "posix" and sys.platform == "darwin":
from ctypes.macholib.dyld import dyld_find as _dyld_find
def find_library(name):
possible = ['lib%s.dylib' % name,
@@ -80,7 +80,7 @@ if os.name == "posix" and sys.platform == "darwin":
continue
return None
-if sys.platform.startswith("aix"):
+elif sys.platform.startswith("aix"):
# AIX has two styles of storing shared libraries
# GNU auto_tools refer to these as svr4 and aix
# svr4 (System V Release 4) is a regular file, often with .so as suffix