diff options
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r-- | Modules/timemodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 9ab2724..13c0535 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -357,7 +357,7 @@ gettmarg(PyObject *args, struct tm *p) if (y < 1900) { PyObject *accept = PyDict_GetItemString(moddict, "accept2dyear"); - if (accept == NULL || !PyInt_Check(accept) || + if (accept == NULL || !PyInt_CheckExact(accept) || PyInt_AsLong(accept) == 0) { PyErr_SetString(PyExc_ValueError, "year >= 1900 required"); |