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:
Tim Peters 2003-01-17 20:08:54 +00:00
parent 504377d4dd
commit 8b19a93b87
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}