[Python-checkins] cpython: Issue #19437: Fix os.statvfs(), handle errors
victor.stinner
python-checkins at python.org
Wed Oct 30 19:58:53 CET 2013
http://hg.python.org/cpython/rev/7097b5c39db0
changeset: 86782:7097b5c39db0
user: Victor Stinner <victor.stinner at gmail.com>
date: Wed Oct 30 18:55:24 2013 +0100
summary:
Issue #19437: Fix os.statvfs(), handle errors
files:
Modules/posixmodule.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -9173,6 +9173,10 @@
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;
}
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list