summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-07-18 03:50:12 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-07-18 03:50:12 (GMT)
commitbd9c655c973c8933ed479d70b5919677be9440d2 (patch)
tree7df8a37dd5516e2631910be3b82a63941f47c025 /Python
parent76f7f4d979fcec9cff5175044f1c05123f0d7def (diff)
parente52181c05af4b5cbe6951dce8440ed4d76f11726 (diff)
downloadcpython-bd9c655c973c8933ed479d70b5919677be9440d2.zip
cpython-bd9c655c973c8933ed479d70b5919677be9440d2.tar.gz
cpython-bd9c655c973c8933ed479d70b5919677be9440d2.tar.bz2
merge heads
Diffstat (limited to 'Python')
-rw-r--r--Python/_warnings.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c
index 615a2d3..f8a7175 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;
}