When time.localtime() is passed a tick count the platform C localtime()
function can't handle, don't raise IOError -- that doesn't make sense.
Raise ValueError instead.
Bugfix candidate.
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 7a2f02a8..c688091 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -273,7 +273,7 @@
if (errno == 0)
errno = EINVAL;
#endif
- return PyErr_SetFromErrno(PyExc_IOError);
+ return PyErr_SetFromErrno(PyExc_ValueError);
}
return tmtotuple(p);
}