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.
diff --git a/Misc/NEWS b/Misc/NEWS
index bcc696a..b3a56b0 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,9 @@
 Core and builtins
 -----------------
 
+- SF bug #1232517: An overflow error was not detected properly when
+  attempting to convert a large float to an int in os.utime().
+
 - SF bug #1224347: hex longs now print with lowercase letters just
   like their int counterparts.
 
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 @@
 			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)