]> granicus.if.org Git - python/commitdiff
code style
authorBenjamin Peterson <benjamin@python.org>
Sat, 20 Nov 2010 17:21:08 +0000 (17:21 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sat, 20 Nov 2010 17:21:08 +0000 (17:21 +0000)
Objects/abstract.c

index d039a9c864185cf2c8f4dbfb36ecba78d15ea6f9..2f887aa0563796bb9422f2c05b6697687508db4b 100644 (file)
@@ -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);