]> granicus.if.org Git - python/commitdiff
adjust braces a bit
authorBenjamin Peterson <benjamin@python.org>
Wed, 19 Oct 2011 20:57:40 +0000 (16:57 -0400)
committerBenjamin Peterson <benjamin@python.org>
Wed, 19 Oct 2011 20:57:40 +0000 (16:57 -0400)
Objects/genobject.c

index 49e2adeaa060f3daf8a6ad9697354d1ad4ac2371..42608eff36a48f0760cc076a506d5c4cec4ceefc 100644 (file)
@@ -232,8 +232,9 @@ gen_throw(PyGenObject *gen, PyObject *args)
 
     /* First, check the traceback argument, replacing None with
        NULL. */
-    if (tb == Py_None)
+    if (tb == Py_None) {
         tb = NULL;
+    }
     else if (tb != NULL && !PyTraceBack_Check(tb)) {
         PyErr_SetString(PyExc_TypeError,
             "throw() third argument must be a traceback object");
@@ -244,9 +245,8 @@ gen_throw(PyGenObject *gen, PyObject *args)
     Py_XINCREF(val);
     Py_XINCREF(tb);
 
-    if (PyExceptionClass_Check(typ)) {
+    if (PyExceptionClass_Check(typ))
         PyErr_NormalizeException(&typ, &val, &tb);
-    }
 
     else if (PyExceptionInstance_Check(typ)) {
         /* Raising an instance.  The value should be a dummy. */
@@ -262,10 +262,9 @@ gen_throw(PyGenObject *gen, PyObject *args)
             typ = PyExceptionInstance_Class(typ);
             Py_INCREF(typ);
 
-            if (tb == NULL) {
+            if (tb == NULL)
                 /* Returns NULL if there's no traceback */
                 tb = PyException_GetTraceback(val);
-            }
         }
     }
     else {