diff options
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2012-09-20 21:23:46 (GMT) |
---|---|---|
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2012-09-20 21:23:46 (GMT) |
commit | 57caede4705f5e3121f9f90435009ef8e7269a98 (patch) | |
tree | ae5778774039a7b88134d35c728638d81d7a046e /Modules/_datetimemodule.c | |
parent | 6f543a307332b6034c22da2e979233b3b05b7dff (diff) | |
download | cpython-57caede4705f5e3121f9f90435009ef8e7269a98.zip cpython-57caede4705f5e3121f9f90435009ef8e7269a98.tar.gz cpython-57caede4705f5e3121f9f90435009ef8e7269a98.tar.bz2 |
Issue #15973: fixed 3.2 backport.
Diffstat (limited to 'Modules/_datetimemodule.c')
-rw-r--r-- | Modules/_datetimemodule.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index 444cc00..ef2f7b3 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; |