summaryrefslogtreecommitdiff
path: root/Python/ceval.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 7c7116ce41..c08585178c 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -3164,9 +3164,9 @@ do_raise(PyObject *type, PyObject *value, PyObject *tb)
assert(PyExceptionClass_Check(type));
if (Py_Py3kWarningFlag && PyClass_Check(type)) {
- if (PyErr_Warn(PyExc_DeprecationWarning,
+ if (PyErr_WarnEx(PyExc_DeprecationWarning,
"exceptions must derive from BaseException "
- "in 3.x") == -1)
+ "in 3.x", 1) == -1)
goto raise_error;
}