Issue #19437: Fix os.statvfs(), handle errors

This commit is contained in:
Victor Stinner 2013-10-30 18:55:24 +01:00
parent a6b9b071a3
commit f0a7bac201
1 changed files with 4 additions and 0 deletions

View File

@ -9173,6 +9173,10 @@ _pystatvfs_fromstructstatvfs(struct statvfs st) {
PyStructSequence_SET_ITEM(v, 8, PyLong_FromLong((long) st.f_flag));
PyStructSequence_SET_ITEM(v, 9, PyLong_FromLong((long) st.f_namemax));
#endif
if (PyErr_Occurred()) {
Py_DECREF(v);
return NULL;
}
return v;
}