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