summaryrefslogtreecommitdiffstats
path: root/Objects/exceptions.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-04-27 18:40:21 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-04-27 18:40:21 (GMT)
commitf19a7b90bd0cbdf40d02f125db3e39f077f3a89f (patch)
treec5ec7d4eb8e528e91715cccab39590324ca0327c /Objects/exceptions.c
parentfe4948bcefe247ca69e3d605eac1d9d4985e4cfd (diff)
downloadcpython-f19a7b90bd0cbdf40d02f125db3e39f077f3a89f.zip
cpython-f19a7b90bd0cbdf40d02f125db3e39f077f3a89f.tar.gz
cpython-f19a7b90bd0cbdf40d02f125db3e39f077f3a89f.tar.bz2
A little reformating of Py3k warnings
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r--Objects/exceptions.c10
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);