mirror of
https://github.com/python/cpython.git
synced 2026-05-18 10:24:42 -04:00
Fix logic error in Python/_warnings.c and add a test to verify
This commit is contained in:
@@ -400,6 +400,8 @@ warn_explicit(PyObject *category, PyObject *message,
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"warnings.showwarning() must be set to a "
|
||||
"function or method");
|
||||
Py_DECREF(show_fxn);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
defaults = PyFunction_GetDefaults(check_fxn);
|
||||
|
||||
Reference in New Issue
Block a user