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