mirror of
https://github.com/python/cpython.git
synced 2025-11-24 20:30:18 +00:00
Use PyErr_WarnPy3k throughout
This commit is contained in:
parent
a692c4df63
commit
9f4f48114f
14 changed files with 47 additions and 88 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue