From 744e166e9d6e7eb47093b97ae47ae66da62ffbbf Mon Sep 17 00:00:00 2001 From: Unbit Date: Wed, 3 Jul 2013 15:41:57 +0200 Subject: [PATCH] Revert "uwsgi.is_locked raises an exception" This reverts commit 5a3b93f763c7a0ea90ba11d53b7d642c07e41efd. --- plugins/python/uwsgi_pymodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/python/uwsgi_pymodule.c b/plugins/python/uwsgi_pymodule.c index f15f7ab3..e633d53d 100644 --- a/plugins/python/uwsgi_pymodule.c +++ b/plugins/python/uwsgi_pymodule.c @@ -955,7 +955,8 @@ PyObject *py_uwsgi_is_locked(PyObject * self, PyObject * args) { if (uwsgi_lock_check(uwsgi.user_lock[lock_num]) == 0) { UWSGI_GET_GIL - return PyErr_Format(PyExc_Exception, "already locked"); + Py_INCREF(Py_False); + return Py_False; } UWSGI_GET_GIL