diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-09-16 20:33:22 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-09-16 20:33:22 (GMT) |
commit | bc7e863ce2aa9d3b9e5077865647f5db0ee050de (patch) | |
tree | b77fe75c9bce14ed54c432256b7f7fb9882dd71f | |
parent | 28bc59f1169298470f7c80ed54810a330d68b3c8 (diff) | |
download | cpython-bc7e863ce2aa9d3b9e5077865647f5db0ee050de.zip cpython-bc7e863ce2aa9d3b9e5077865647f5db0ee050de.tar.gz cpython-bc7e863ce2aa9d3b9e5077865647f5db0ee050de.tar.bz2 |
merge_class_dict(): Clear the error if __bases__ doesn't exist.
-rw-r--r-- | Objects/object.c | 4 |
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); |