diff Modules/timemodule.c @ 27281:5a050200f736 legacy-trunk

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.
author Tim Peters <tim.peters@gmail.com>
date Fri, 17 Jan 2003 20:08:54 +0000
parents 915112671152
children 7055f4c1edcc
line wrap: on
line diff
--- a/Modules/timemodule.c	Fri Jan 17 20:02:06 2003 +0000
+++ b/Modules/timemodule.c	Fri Jan 17 20:08:54 2003 +0000
@@ -273,7 +273,7 @@
 		if (errno == 0)
 			errno = EINVAL;
 #endif
-		return PyErr_SetFromErrno(PyExc_IOError);
+		return PyErr_SetFromErrno(PyExc_ValueError);
 	}
 	return tmtotuple(p);
 }