_ctypes: use_errno=True for ctypes.get_errno()
authorMike Gilbert <floppym@gentoo.org>
Wed, 11 Sep 2013 14:06:33 +0000 (07:06 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Sep 2013 14:06:33 +0000 (07:06 -0700)
pym/portage/util/_ctypes.py

index 4e5aa2a6b3ad4414b10c374325dbd2c7ed5663e5..aeceebcca483208e31cb3bc23f913a29044d222f 100644 (file)
@@ -41,7 +41,7 @@ def LoadLibrary(name):
        handle = _library_handles.get(name)
 
        if handle is None and ctypes is not None:
-               handle = ctypes.cdll.LoadLibrary(name)
+               handle = ctypes.CDLL(name, use_errno=True)
                _library_handles[name] = handle
 
        return handle