mirror of https://github.com/python/cpython.git
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
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue