[Python-checkins] python/dist/src/Modules timemodule.c,2.132,2.133

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Fri, 17 Jan 2003 12:08:59 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv24013/python/Modules

Modified Files:
	timemodule.c 
Log Message:
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.


Index: timemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v
retrieving revision 2.132
retrieving revision 2.133
diff -C2 -d -r2.132 -r2.133
*** timemodule.c	16 Oct 2002 20:28:25 -0000	2.132
--- timemodule.c	17 Jan 2003 20:08:54 -0000	2.133
***************
*** 274,278 ****
  			errno = EINVAL;
  #endif
! 		return PyErr_SetFromErrno(PyExc_IOError);
  	}
  	return tmtotuple(p);
--- 274,278 ----
  			errno = EINVAL;
  #endif
! 		return PyErr_SetFromErrno(PyExc_ValueError);
  	}
  	return tmtotuple(p);