diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-02-04 00:22:31 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-02-04 00:22:31 (GMT) |
commit | 4c79aec7162a1f31c11cd754863908de696b6c64 (patch) | |
tree | 1e0b13c6fb295a7fb1fb4da018cc707df5fdfb97 | |
parent | 0013783d2f9d71e634fd2c91964bff27f87cbaa8 (diff) | |
download | cpython-4c79aec7162a1f31c11cd754863908de696b6c64.zip cpython-4c79aec7162a1f31c11cd754863908de696b6c64.tar.gz cpython-4c79aec7162a1f31c11cd754863908de696b6c64.tar.bz2 |
put returns on their own lines
-rw-r--r-- | Objects/exceptions.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c index 711c87d..2657185 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -306,7 +306,8 @@ BaseException_set_args(PyBaseExceptionObject *self, PyObject *val) return -1; } seq = PySequence_Tuple(val); - if (!seq) return -1; + if (!seq) + return -1; Py_CLEAR(self->args); self->args = seq; return 0; @@ -773,7 +774,8 @@ EnvironmentError_reduce(PyEnvironmentErrorObject *self) * file name given to EnvironmentError. */ if (PyTuple_GET_SIZE(args) == 2 && self->filename) { args = PyTuple_New(3); - if (!args) return NULL; + if (!args) + return NULL; tmp = PyTuple_GET_ITEM(self->args, 0); Py_INCREF(tmp); @@ -1071,7 +1073,8 @@ SyntaxError_init(PySyntaxErrorObject *self, PyObject *args, PyObject *kwds) if (lenargs == 2) { info = PyTuple_GET_ITEM(args, 1); info = PySequence_Tuple(info); - if (!info) return -1; + if (!info) + return -1; if (PyTuple_GET_SIZE(info) != 4) { /* not a very good error message, but it's what Python 2.4 gives */ @@ -1167,9 +1170,11 @@ SyntaxError_str(PySyntaxErrorObject *self) str = PyObject_Str(self->msg); else str = PyObject_Str(Py_None); - if (!str) return NULL; + if (!str) + return NULL; /* Don't fiddle with non-string return (shouldn't happen anyway) */ - if (!PyString_Check(str)) return str; + if (!PyString_Check(str)) + return str; /* XXX -- do all the additional formatting with filename and lineno here */ @@ -2111,7 +2116,8 @@ _PyExc_Init(void) m = Py_InitModule4("exceptions", functions, exceptions_doc, (PyObject *)NULL, PYTHON_API_VERSION); - if (m == NULL) return; + if (m == NULL) + return; bltinmod = PyImport_ImportModule("__builtin__"); if (bltinmod == NULL) |