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