summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/src/leap/soledad/server/__init__.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/server/src/leap/soledad/server/__init__.py b/server/src/leap/soledad/server/__init__.py
index e4fa4aa7..d154e3fe 100644
--- a/server/src/leap/soledad/server/__init__.py
+++ b/server/src/leap/soledad/server/__init__.py
@@ -272,12 +272,14 @@ def _get_couch_state():
SoledadBackend.BATCH_SUPPORT = conf.get('batching', False)
return state
+try:
+ _couch_state = _get_couch_state()
+ # a WSGI application that may be used by `twistd -web`
+ application = GzipMiddleware(
+ SoledadTokenAuthMiddleware(SoledadApp(_couch_state)))
+except:
+ pass
-_couch_state = _get_couch_state()
-
-# a WSGI application that may be used by `twistd -web`
-application = GzipMiddleware(
- SoledadTokenAuthMiddleware(SoledadApp(_couch_state)))
# another WSGI application in which we bypass token auth middleware for ease of
# mind while debugging in your local environment