mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-1102: View.Fetch() now returns None when it's exhausted (GH-4459)
This commit is contained in:
parent
5ce1069a6f
commit
bdb8315c21
3 changed files with 49 additions and 2 deletions
|
@ -723,8 +723,12 @@ view_fetch(msiobj *view, PyObject*args)
|
|||
int status;
|
||||
MSIHANDLE result;
|
||||
|
||||
if ((status = MsiViewFetch(view->h, &result)) != ERROR_SUCCESS)
|
||||
status = MsiViewFetch(view->h, &result);
|
||||
if (status == ERROR_NO_MORE_ITEMS) {
|
||||
Py_RETURN_NONE;
|
||||
} else if (status != ERROR_SUCCESS) {
|
||||
return msierror(status);
|
||||
}
|
||||
|
||||
return record_new(result);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue