mirror of
https://github.com/python/cpython.git
synced 2025-09-28 11:15:17 +00:00
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.
This commit is contained in:
parent
504377d4dd
commit
8b19a93b87
1 changed files with 1 additions and 1 deletions
|
@ -273,7 +273,7 @@ time_convert(time_t when, struct tm * (*function)(const time_t *))
|
|||
if (errno == 0)
|
||||
errno = EINVAL;
|
||||
#endif
|
||||
return PyErr_SetFromErrno(PyExc_IOError);
|
||||
return PyErr_SetFromErrno(PyExc_ValueError);
|
||||
}
|
||||
return tmtotuple(p);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue