diff options
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index c085851..0cff157 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3157,16 +3157,16 @@ do_raise(PyObject *type, PyObject *value, PyObject *tb) /* Not something you can raise. You get an exception anyway, just not what you specified :-) */ PyErr_Format(PyExc_TypeError, - "exceptions must be classes or instances, not %s", - type->ob_type->tp_name); + "exceptions must be classes or instances, not %s", + type->ob_type->tp_name); goto raise_error; } assert(PyExceptionClass_Check(type)); if (Py_Py3kWarningFlag && PyClass_Check(type)) { if (PyErr_WarnEx(PyExc_DeprecationWarning, - "exceptions must derive from BaseException " - "in 3.x", 1) == -1) + "exceptions must derive from BaseException " + "in 3.x", 1) < 0) goto raise_error; } @@ -4092,7 +4092,7 @@ cmp_outcome(int op, register PyObject *v, register PyObject *w) PyExc_DeprecationWarning, "catching of string " "exceptions is deprecated", 1); - if (ret_val == -1) + if (ret_val < 0) return NULL; } else if (Py_Py3kWarningFlag && @@ -4103,7 +4103,7 @@ cmp_outcome(int op, register PyObject *v, register PyObject *w) ret_val = PyErr_WarnEx( PyExc_DeprecationWarning, CANNOT_CATCH_MSG, 1); - if (ret_val == -1) + if (ret_val < 0) return NULL; } } @@ -4115,7 +4115,7 @@ cmp_outcome(int op, register PyObject *v, register PyObject *w) PyExc_DeprecationWarning, "catching of string " "exceptions is deprecated", 1); - if (ret_val == -1) + if (ret_val < 0) return NULL; } else if (Py_Py3kWarningFlag && @@ -4126,7 +4126,7 @@ cmp_outcome(int op, register PyObject *v, register PyObject *w) ret_val = PyErr_WarnEx( PyExc_DeprecationWarning, CANNOT_CATCH_MSG, 1); - if (ret_val == -1) + if (ret_val < 0) return NULL; } } |