]> granicus.if.org Git - python/commitdiff
Removed noop branch from ctypes code (#3234)
authorAlex Gaynor <alex.gaynor@gmail.com>
Wed, 30 Aug 2017 11:43:14 +0000 (07:43 -0400)
committerAntoine Pitrou <pitrou@free.fr>
Wed, 30 Aug 2017 11:43:14 +0000 (13:43 +0200)
Lib/ctypes/__init__.py

index f8709683fb681fc48e871fffb9ed69fe8061dde1..972ea0ac8795a1f98734b6e78d32d717ff98ea98 100644 (file)
@@ -440,10 +440,7 @@ if _os.name == "nt":
     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):