uwsgi.is_locked raises an exception