]> granicus.if.org Git - python/commitdiff
remove extraneous condition
authorBenjamin Peterson <benjamin@python.org>
Sun, 1 Apr 2012 22:48:40 +0000 (18:48 -0400)
committerBenjamin Peterson <benjamin@python.org>
Sun, 1 Apr 2012 22:48:40 +0000 (18:48 -0400)
Objects/typeobject.c

index 9f0ab159453795f1840715013b9dfe43b4210b55..c12cd7ca32a159540c4ea64d3572d8c4123c3f39 100644 (file)
@@ -464,12 +464,10 @@ type_set_bases(PyTypeObject *type, PyObject *value, void *context)
                             type->tp_name, Py_TYPE(ob)->tp_name);
                     return -1;
         }
-        if (PyType_Check(ob)) {
-            if (PyType_IsSubtype((PyTypeObject*)ob, type)) {
-                PyErr_SetString(PyExc_TypeError,
-            "a __bases__ item causes an inheritance cycle");
-                return -1;
-            }
+        if (PyType_IsSubtype((PyTypeObject*)ob, type)) {
+            PyErr_SetString(PyExc_TypeError,
+                            "a __bases__ item causes an inheritance cycle");
+            return -1;
         }
     }