From f19a7b90bd0cbdf40d02f125db3e39f077f3a89f Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 27 Apr 2008 18:40:21 +0000 Subject: A little reformating of Py3k warnings --- Python/ceval.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Python/ceval.c') diff --git a/Python/ceval.c b/Python/ceval.c index c08585178c..0cff157662 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; } } -- cgit v1.2.1