summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-11-20 17:21:08 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-11-20 17:21:08 (GMT)
commit72288d4f3cf1e4a66ed8575cb3063ad6a6810f82 (patch)
treece6233e90f9b5b2586a778eb6016e9b3ecc907a7 /Objects
parent5e703cf32b565611380538be794df8f04a719769 (diff)
downloadcpython-72288d4f3cf1e4a66ed8575cb3063ad6a6810f82.zip
cpython-72288d4f3cf1e4a66ed8575cb3063ad6a6810f82.tar.gz
cpython-72288d4f3cf1e4a66ed8575cb3063ad6a6810f82.tar.bz2
code style
Diffstat (limited to 'Objects')
-rw-r--r--Objects/abstract.c12
1 files 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);