remove extraneous condition

This commit is contained in:
Benjamin Peterson 2012-04-01 18:48:40 -04:00
parent 29f843816b
commit 3471bb67e7
1 changed files with 4 additions and 6 deletions

View File

@ -464,14 +464,12 @@ 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;
}
}
}
new_base = best_base(value);