From: Raymond Hettinger Date: Mon, 2 Nov 2015 12:27:40 +0000 (-0500) Subject: Minor cleanup. X-Git-Tag: v3.6.0a1~1136 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=df8f5b56c9dc5e950f39ed0221212256a39c1835;p=thirdparty%2FPython%2Fcpython.git Minor cleanup. --- diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index c9e4568ce097..1ca6c72d37a1 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -1060,7 +1060,7 @@ deque_index(dequeobject *deque, PyObject *args) cmp = PyObject_RichCompareBool(item, v, Py_EQ); if (cmp > 0) return PyLong_FromSsize_t(stop - (n + 1)); - else if (cmp < 0) + if (cmp < 0) return NULL; if (start_state != deque->state) { PyErr_SetString(PyExc_RuntimeError,