mirror of https://github.com/python/cpython.git
Clean up the Py3k warnings for non-BaseException-subclasses a bit. We
now don't warn for some corner cases that deserve a warning, rather than warning double or incorrectly for some other corner cases.
This commit is contained in:
parent
04edb528ca
commit
20bda581e3
|
@ -4086,8 +4086,9 @@ cmp_outcome(int op, register PyObject *v, register PyObject *w)
|
||||||
if (ret_val == -1)
|
if (ret_val == -1)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (Py_Py3kWarningFlag &&
|
else if (Py_Py3kWarningFlag &&
|
||||||
!Py3kExceptionClass_Check(exc))
|
!PyTuple_Check(exc) &&
|
||||||
|
!Py3kExceptionClass_Check(exc))
|
||||||
{
|
{
|
||||||
int ret_val;
|
int ret_val;
|
||||||
ret_val = PyErr_WarnEx(
|
ret_val = PyErr_WarnEx(
|
||||||
|
@ -4108,8 +4109,9 @@ cmp_outcome(int op, register PyObject *v, register PyObject *w)
|
||||||
if (ret_val == -1)
|
if (ret_val == -1)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (Py_Py3kWarningFlag &&
|
else if (Py_Py3kWarningFlag &&
|
||||||
!Py3kExceptionClass_Check(w))
|
!PyTuple_Check(w) &&
|
||||||
|
!Py3kExceptionClass_Check(w))
|
||||||
{
|
{
|
||||||
int ret_val;
|
int ret_val;
|
||||||
ret_val = PyErr_WarnEx(
|
ret_val = PyErr_WarnEx(
|
||||||
|
|
Loading…
Reference in New Issue