From bc7e863ce2aa9d3b9e5077865647f5db0ee050de Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Sun, 16 Sep 2001 20:33:22 +0000 Subject: merge_class_dict(): Clear the error if __bases__ doesn't exist. --- Objects/object.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Objects/object.c b/Objects/object.c index 30263ba..fd31e51 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -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); -- cgit v0.12