From cb76029b47f26e969317f21d118392a699d1329e Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 30 Aug 2017 07:43:14 -0400 Subject: [PATCH] Removed noop branch from ctypes code (#3234) --- Lib/ctypes/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py index f8709683fb681f..972ea0ac8795a1 100644 --- a/Lib/ctypes/__init__.py +++ b/Lib/ctypes/__init__.py @@ -440,10 +440,7 @@ def LoadLibrary(self, name): windll = LibraryLoader(WinDLL) oledll = LibraryLoader(OleDLL) - if _os.name == "nt": - GetLastError = windll.kernel32.GetLastError - else: - GetLastError = windll.coredll.GetLastError + GetLastError = windll.kernel32.GetLastError from _ctypes import get_last_error, set_last_error def WinError(code=None, descr=None):