diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-03-21 01:14:53 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-03-21 01:14:53 (GMT) |
commit | 6f0e4f99ab2f14864557e7f8dda1d575dd0e1f6c (patch) | |
tree | dfc98ad7fc1ae0ddb1ac0f083dc37c1b8e8ad779 | |
parent | 13ed2ea7a21cf98acb4497aa1edd3202a99682c6 (diff) | |
download | cpython-6f0e4f99ab2f14864557e7f8dda1d575dd0e1f6c.zip cpython-6f0e4f99ab2f14864557e7f8dda1d575dd0e1f6c.tar.gz cpython-6f0e4f99ab2f14864557e7f8dda1d575dd0e1f6c.tar.bz2 |
time.strftime(): replace PyErr_Format() by PyErr_SetString()
The argument was not used in the format string.
-rw-r--r-- | Modules/timemodule.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 86b73a5..c3b51ef 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -476,9 +476,8 @@ time_strftime(PyObject *self, PyObject *args) #if defined(_MSC_VER) || defined(sun) if (buf.tm_year + 1900 < 1 || 9999 < buf.tm_year + 1900) { - PyErr_Format(PyExc_ValueError, - "strftime() requires year in [1; 9999]", - buf.tm_year + 1900); + PyErr_SetString(PyExc_ValueError, + "strftime() requires year in [1; 9999]"); return NULL; } #endif |