diff options
author | Jesus Cea <jcea@jcea.es> | 2011-09-19 17:11:26 +0200 |
---|---|---|
committer | Jesus Cea <jcea@jcea.es> | 2011-09-19 17:11:26 +0200 |
commit | 5709b0a9933ce87f78389617abfd934fd113ba5f (patch) | |
tree | ad751c5cbc2f43440c1faf775e102decfa0f9dcb /Python/_warnings.c | |
parent | 66c4188b352a7c021c7b83f70d1a1e54bbed45df (diff) | |
parent | 016d82354232e8a1924135ff10fac70cf5c720b9 (diff) | |
download | cpython-5709b0a9933ce87f78389617abfd934fd113ba5f.tar.gz |
Close #13007: whichdb should recognize gdbm 1.9 magic numbers
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r-- | Python/_warnings.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index 615a2d3217..f8a7175f92 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -409,10 +409,10 @@ warn_explicit(PyObject *category, PyObject *message, else { PyObject *res; - if (!PyMethod_Check(show_fxn) && !PyFunction_Check(show_fxn)) { + if (!PyCallable_Check(show_fxn)) { PyErr_SetString(PyExc_TypeError, "warnings.showwarning() must be set to a " - "function or method"); + "callable"); Py_DECREF(show_fxn); goto cleanup; } |