merge_class_dict(): Clear the error if __bases__ doesn't exist.

This commit is contained in:
Tim Peters 2001-09-16 20:33:22 +00:00
parent 28bc59f116
commit bc7e863ce2
1 changed files with 3 additions and 1 deletions

View File

@ -1399,7 +1399,9 @@ merge_class_dict(PyObject* dict, PyObject* aclass)
/* Recursively merge in the base types' (if any) dicts. */
bases = PyObject_GetAttrString(aclass, "__bases__");
if (bases != NULL) {
if (bases == NULL)
PyErr_Clear();
else {
int i, n;
assert(PyTuple_Check(bases));
n = PyTuple_GET_SIZE(bases);