Author: andrewjlawrence
Branch: winoverlapped
Changeset: r96385:c91d95fe08ff
Date: 2019-03-28 22:16 +0000
http://bitbucket.org/pypy/pypy/changeset/c91d95fe08ff/
Log: Correct GetLastError module.
diff --git a/lib_pypy/_overlapped.py b/lib_pypy/_overlapped.py
--- a/lib_pypy/_overlapped.py
+++ b/lib_pypy/_overlapped.py
@@ -225,7 +225,7 @@
if not HasOverlappedIoCompleted(self.overlapped[0]):
### If we are to support xp we will need to dynamically load the
below method
result = _kernel32.CancelIoEx(self.handle, self.overlapped)
- if (not result and _winapi.GetLastError() != _winapi.ERROR_NOT_FOUND):
+ if (not result and _kernel32.GetLastError() !=
_winapi.ERROR_NOT_FOUND):
raise _winapi._WinError()
def WSARecv(self ,handle, size, flags):
@@ -356,7 +356,7 @@
if ret:
self.error = _winapi.ERROR_SUCCESS
else:
- self.error = _winapi.GetLastError()
+ self.error = _kernel32.GetLastError()
if self.error == _winapi.ERROR_SUCCESS or self.error ==
_winapi.ERROR_IO_PENDING:
return None
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit