mirror of
https://github.com/python/cpython.git
synced 2025-11-11 22:55:08 +00:00
Issue #19437: Fix os.statvfs(), handle errors
This commit is contained in:
parent
a6b9b071a3
commit
f0a7bac201
1 changed files with 4 additions and 0 deletions
|
|
@ -9173,6 +9173,10 @@ _pystatvfs_fromstructstatvfs(struct statvfs st) {
|
||||||
PyStructSequence_SET_ITEM(v, 8, PyLong_FromLong((long) st.f_flag));
|
PyStructSequence_SET_ITEM(v, 8, PyLong_FromLong((long) st.f_flag));
|
||||||
PyStructSequence_SET_ITEM(v, 9, PyLong_FromLong((long) st.f_namemax));
|
PyStructSequence_SET_ITEM(v, 9, PyLong_FromLong((long) st.f_namemax));
|
||||||
#endif
|
#endif
|
||||||
|
if (PyErr_Occurred()) {
|
||||||
|
Py_DECREF(v);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue