diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2017-11-23 14:33:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-23 14:33:12 (GMT) |
commit | 4b3042900e7e8dc120408bab86642c09c9d25a5a (patch) | |
tree | 0ad2092325d91b325a83d28b1846cbe07df4ed94 /PC/_msi.c | |
parent | ae3c5c7b9e5e5ba53213e12cc100e32415d5762c (diff) | |
download | cpython-4b3042900e7e8dc120408bab86642c09c9d25a5a.zip cpython-4b3042900e7e8dc120408bab86642c09c9d25a5a.tar.gz cpython-4b3042900e7e8dc120408bab86642c09c9d25a5a.tar.bz2 |
bpo-1102: View.Fetch() now returns None when it's exhausted (GH-4459)
(cherry picked from commit bdb8315c21825487b54852ff0511fb4881ea2181)
Diffstat (limited to 'PC/_msi.c')
-rw-r--r-- | PC/_msi.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -729,8 +729,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); } |