Commit 3471bb67 authored by Benjamin Peterson's avatar Benjamin Peterson

remove extraneous condition

parent 29f84381
...@@ -464,12 +464,10 @@ type_set_bases(PyTypeObject *type, PyObject *value, void *context) ...@@ -464,12 +464,10 @@ type_set_bases(PyTypeObject *type, PyObject *value, void *context)
type->tp_name, Py_TYPE(ob)->tp_name); type->tp_name, Py_TYPE(ob)->tp_name);
return -1; return -1;
} }
if (PyType_Check(ob)) { if (PyType_IsSubtype((PyTypeObject*)ob, type)) {
if (PyType_IsSubtype((PyTypeObject*)ob, type)) { PyErr_SetString(PyExc_TypeError,
PyErr_SetString(PyExc_TypeError, "a __bases__ item causes an inheritance cycle");
"a __bases__ item causes an inheritance cycle"); return -1;
return -1;
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment