diff options
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r-- | Objects/exceptions.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c index 4a9eba1..48b47b0 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -279,9 +279,8 @@ BaseException_get_message(PyBaseExceptionObject *self) int ret; ret = PyErr_WarnEx(PyExc_DeprecationWarning, "BaseException.message has been deprecated as " - "of Python 2.6", - 1); - if (ret == -1) + "of Python 2.6", 1); + if (ret < 0) return NULL; Py_INCREF(self->message); @@ -294,9 +293,8 @@ BaseException_set_message(PyBaseExceptionObject *self, PyObject *val) int ret; ret = PyErr_WarnEx(PyExc_DeprecationWarning, "BaseException.message has been deprecated as " - "of Python 2.6", - 1); - if (ret == -1) + "of Python 2.6", 1); + if (ret < 0) return -1; Py_INCREF(val); Py_DECREF(self->message); |