A little reformating of Py3k warnings
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 @@
/* 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 @@
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 @@
ret_val = PyErr_WarnEx(
PyExc_DeprecationWarning,
CANNOT_CATCH_MSG, 1);
- if (ret_val == -1)
+ if (ret_val < 0)
return NULL;
}
}
@@ -4115,7 +4115,7 @@
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 @@
ret_val = PyErr_WarnEx(
PyExc_DeprecationWarning,
CANNOT_CATCH_MSG, 1);
- if (ret_val == -1)
+ if (ret_val < 0)
return NULL;
}
}