From: Victor Stinner Date: Mon, 21 Mar 2011 01:14:53 +0000 (+0100) Subject: time.strftime(): replace PyErr_Format() by PyErr_SetString() X-Git-Tag: v3.2.1b1~243 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6f0e4f99ab2f14864557e7f8dda1d575dd0e1f6c;p=python time.strftime(): replace PyErr_Format() by PyErr_SetString() The argument was not used in the format string. --- diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 86b73a575a..c3b51efc5b 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