]> granicus.if.org Git - python/commitdiff
time.strftime(): replace PyErr_Format() by PyErr_SetString()
authorVictor Stinner <victor.stinner@haypocalc.com>
Mon, 21 Mar 2011 01:14:53 +0000 (02:14 +0100)
committerVictor Stinner <victor.stinner@haypocalc.com>
Mon, 21 Mar 2011 01:14:53 +0000 (02:14 +0100)
The argument was not used in the format string.

Modules/timemodule.c

index 86b73a575ac9feaee2e123f5394cf59fcd48553a..c3b51efc5be59a2072990356ffae389a1f68d118 100644 (file)
@@ -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