From 19aa7c25601a35d59b237a28a11ff1d7831d6e7b Mon Sep 17 00:00:00 2001 From: Unbit Date: Mon, 30 Sep 2013 09:40:40 +0200 Subject: [PATCH] clear exception on PyObject_CheckReadBuffer error --- plugins/python/wsgi_subhandler.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/python/wsgi_subhandler.c b/plugins/python/wsgi_subhandler.c index b2851b49..9167bf3b 100644 --- a/plugins/python/wsgi_subhandler.c +++ b/plugins/python/wsgi_subhandler.c @@ -31,6 +31,7 @@ int uwsgi_python_send_body(struct wsgi_request *wsgi_req, PyObject *chunk) { #else if (PyObject_CheckReadBuffer(chunk)) { if (!PyObject_AsCharBuffer(chunk, (const char **) &content, (Py_ssize_t *) &content_len)) { + PyErr_Clear(); goto found; } }