summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-01-17 20:08:54 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-01-17 20:08:54 (GMT)
commit8b19a93b87d6514fec9918cd0b13cefbaca83950 (patch)
treefe39bb0df903fa67ca12d8b05f8a5cd49a3f9a4c
parent504377d4ddc997bce8165571684729b7b31fccb8 (diff)
downloadcpython-8b19a93b87d6514fec9918cd0b13cefbaca83950.zip
cpython-8b19a93b87d6514fec9918cd0b13cefbaca83950.tar.gz
cpython-8b19a93b87d6514fec9918cd0b13cefbaca83950.tar.bz2
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.
-rw-r--r--Modules/timemodule.c2
1 files changed, 1 insertions, 1 deletions
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 @@ 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);
}