summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-09-16 20:33:22 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-09-16 20:33:22 (GMT)
commitbc7e863ce2aa9d3b9e5077865647f5db0ee050de (patch)
treeb77fe75c9bce14ed54c432256b7f7fb9882dd71f /Objects
parent28bc59f1169298470f7c80ed54810a330d68b3c8 (diff)
downloadcpython-bc7e863ce2aa9d3b9e5077865647f5db0ee050de.zip
cpython-bc7e863ce2aa9d3b9e5077865647f5db0ee050de.tar.gz
cpython-bc7e863ce2aa9d3b9e5077865647f5db0ee050de.tar.bz2
merge_class_dict(): Clear the error if __bases__ doesn't exist.
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);