diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2003-02-23 21:45:43 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2003-02-23 21:45:43 (GMT) |
commit | 3e59076b1d7313b564786ffcbec17ee86aa5cc60 (patch) | |
tree | b26427ebef2cc7c1db598c64abde39e0bb3ee0f7 /Python/bltinmodule.c | |
parent | 7aba3d471f3f23b5cd2a78c4b7756366adfb2130 (diff) | |
download | cpython-3e59076b1d7313b564786ffcbec17ee86aa5cc60.zip cpython-3e59076b1d7313b564786ffcbec17ee86aa5cc60.tar.gz cpython-3e59076b1d7313b564786ffcbec17ee86aa5cc60.tar.bz2 |
Fix SF bug #690435, apply fails to check if warning raises exception
(patch provided by Greg Chapman)
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r-- | Python/bltinmodule.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 62aa512..e246591 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -75,9 +75,10 @@ builtin_apply(PyObject *self, PyObject *args) PyObject *func, *alist = NULL, *kwdict = NULL; PyObject *t = NULL, *retval = NULL; - PyErr_Warn(PyExc_PendingDeprecationWarning, - "use func(*args, **kwargs) instead of " - "apply(func, args, kwargs)"); + if (PyErr_Warn(PyExc_PendingDeprecationWarning, + "use func(*args, **kwargs) instead of " + "apply(func, args, kwargs)") < 0) + return NULL; if (!PyArg_UnpackTuple(args, "apply", 1, 3, &func, &alist, &kwdict)) return NULL; if (alist != NULL) { |