summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2005-07-05 15:21:58 (GMT)
committerMichael W. Hudson <mwh@python.net>2005-07-05 15:21:58 (GMT)
commitb89638148b95c4a018fc8f6c4938ffcd0e1b341a (patch)
tree5499792d4dded418ef51c94fce69c83de07c43a9 /Modules
parent0257424a2ac6ec89732fb90155657dfd8382b686 (diff)
downloadcpython-b89638148b95c4a018fc8f6c4938ffcd0e1b341a.zip
cpython-b89638148b95c4a018fc8f6c4938ffcd0e1b341a.tar.gz
cpython-b89638148b95c4a018fc8f6c4938ffcd0e1b341a.tar.bz2
Fix bug
[ 1232517 ] OverflowError in time.utime() causes strange traceback A needed error check was missing. (Actually, this error check may only have become necessary in fairly recent Python, not sure). Backport candidate.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index e4a0200..e0c2b7f 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -1991,6 +1991,8 @@ extract_time(PyObject *t, long* sec, long* usec)
return -1;
intval = PyInt_AsLong(intobj);
Py_DECREF(intobj);
+ if (intval == -1 && PyErr_Occurred())
+ return -1;
*sec = intval;
*usec = (long)((tval - intval) * 1e6); /* can't exceed 1000000 */
if (*usec < 0)