summaryrefslogtreecommitdiff
path: root/PC
diff options
context:
space:
mode:
Diffstat (limited to 'PC')
-rw-r--r--PC/_msi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/PC/_msi.c b/PC/_msi.c
index df6c881b4e..a6a12e2010 100644
--- a/PC/_msi.c
+++ b/PC/_msi.c
@@ -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);
}