Issue #19437: Fix os.statvfs(), handle errors
This commit is contained in:
parent
a6b9b071a3
commit
f0a7bac201
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue