diff --git a/larigira/rpc.py b/larigira/rpc.py index 97aed06..bd8d8f1 100644 --- a/larigira/rpc.py +++ b/larigira/rpc.py @@ -175,9 +175,11 @@ def rpc_wip(): def babel_get_locale(): - if request.accept_languages: - return request.accept_languages[0][0] - return None + try: + if request.accept_languages: + return request.accept_languages[0][0] + finally: + return None def create_app(queue, larigira):