mirror of https://github.com/python/cpython
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,7 +4086,8 @@ cmp_outcome(int op, register PyObject *v, register PyObject *w)
|
|||
if (ret_val == -1)
|
||||
return NULL;
|
||||
}
|
||||
if (Py_Py3kWarningFlag &&
|
||||
else if (Py_Py3kWarningFlag &&
|
||||
!PyTuple_Check(exc) &&
|
||||
!Py3kExceptionClass_Check(exc))
|
||||
{
|
||||
int ret_val;
|
||||
|
@ -4108,7 +4109,8 @@ cmp_outcome(int op, register PyObject *v, register PyObject *w)
|
|||
if (ret_val == -1)
|
||||
return NULL;
|
||||
}
|
||||
if (Py_Py3kWarningFlag &&
|
||||
else if (Py_Py3kWarningFlag &&
|
||||
!PyTuple_Check(w) &&
|
||||
!Py3kExceptionClass_Check(w))
|
||||
{
|
||||
int ret_val;
|
||||
|
|
Loading…
Reference in New Issue