Commit 8b19a93b authored by Tim Peters's avatar Tim Peters

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.
parent 504377d4
...@@ -273,7 +273,7 @@ time_convert(time_t when, struct tm * (*function)(const time_t *)) ...@@ -273,7 +273,7 @@ time_convert(time_t when, struct tm * (*function)(const time_t *))
if (errno == 0) if (errno == 0)
errno = EINVAL; errno = EINVAL;
#endif #endif
return PyErr_SetFromErrno(PyExc_IOError); return PyErr_SetFromErrno(PyExc_ValueError);
} }
return tmtotuple(p); return tmtotuple(p);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment