(original) (raw)

changeset: 73010:9c79a25f4a8b branch: 3.2 parent: 72998:99a9f0251924 user: Benjamin Peterson benjamin@python.org date: Wed Oct 19 16:57:40 2011 -0400 files: Objects/genobject.c description: adjust braces a bit diff -r 99a9f0251924 -r 9c79a25f4a8b Objects/genobject.c --- a/Objects/genobject.c Thu Oct 20 02:48:01 2011 +0800 +++ b/Objects/genobject.c Wed Oct 19 16:57:40 2011 -0400 @@ -232,8 +232,9 @@ /* 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 @@ 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 @@ 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 { /benjamin@python.org