From: Alexander Belopolsky Date: Thu, 20 Sep 2012 21:23:46 +0000 (-0400) Subject: Issue #15973: fixed 3.2 backport. X-Git-Tag: v3.2.4rc1~513 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=57caede4705f5e3121f9f90435009ef8e7269a98;p=thirdparty%2FPython%2Fcpython.git Issue #15973: fixed 3.2 backport. --- diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index 444cc00d2c54..ef2f7b306a04 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -3243,8 +3243,10 @@ static PyObject * timezone_richcompare(PyDateTime_TimeZone *self, PyDateTime_TimeZone *other, int op) { - if (op != Py_EQ && op != Py_NE) - Py_RETURN_NOTIMPLEMENTED; + if (op != Py_EQ && op != Py_NE) { + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; + } if (Py_TYPE(other) != &PyDateTime_TimeZoneType) { if (op == Py_EQ) Py_RETURN_FALSE;