From 72288d4f3cf1e4a66ed8575cb3063ad6a6810f82 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 20 Nov 2010 17:21:08 +0000 Subject: code style --- Objects/abstract.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Objects/abstract.c b/Objects/abstract.c index d039a9c..2f887aa 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -2500,12 +2500,10 @@ recursive_isinstance(PyObject *inst, PyObject *cls) if (retval == 0) { PyObject *c = PyObject_GetAttr(inst, __class__); if (c == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + if (PyErr_ExceptionMatches(PyExc_AttributeError)) PyErr_Clear(); - } - else { + else retval = -1; - } } else { if (c != (PyObject *)(inst->ob_type) && @@ -2523,12 +2521,10 @@ recursive_isinstance(PyObject *inst, PyObject *cls) return -1; icls = PyObject_GetAttr(inst, __class__); if (icls == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + if (PyErr_ExceptionMatches(PyExc_AttributeError)) PyErr_Clear(); - } - else { + else retval = -1; - } } else { retval = abstract_issubclass(icls, cls); -- cgit v0.12