Issue #15973: fixed 3.2 backport.

This commit is contained in:
Alexander Belopolsky 2012-09-20 17:23:46 -04:00
parent 6f543a3073
commit 57caede470
1 changed files with 4 additions and 2 deletions

View File

@ -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;