summaryrefslogtreecommitdiff
path: root/Python/_warnings.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-09-21 01:12:59 +0200
committerVictor Stinner <victor.stinner@haypocalc.com>2011-09-21 01:12:59 +0200
commit0fc80cf7d66bbe14b54bc278be47b88d0d15d996 (patch)
tree2bced3752153ebe87c3f78d662c941b4df1df2a5 /Python/_warnings.c
parent49ef44d6c75a2e07d4ee0b8395c9b253171db1ea (diff)
parentb0c9e71dba6087fe348f3eae2a83fe8a64c44dc0 (diff)
downloadcpython-0fc80cf7d66bbe14b54bc278be47b88d0d15d996.tar.gz
Merge 3.2: test_multiprocessing removes temporary files
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r--Python/_warnings.c4
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;
}