summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/object.c4
1 files changed, 3 insertions, 1 deletions
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);