summaryrefslogtreecommitdiff
path: root/src/leap/soledad/common/couch
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-10-27 18:58:03 -0300
committerdrebs <drebs@riseup.net>2017-10-31 16:53:02 -0200
commit17b4ab3d98439cf5e7e7893da1f1b9f6a08ab82c (patch)
treefe310f4a3639da2e6386afb79e47e0a2da842932 /src/leap/soledad/common/couch
parent3306ea69ee33cdafa8803f9c717b60b9f3d3b4a0 (diff)
[bug] set errbacks before gathering results
Diffstat (limited to 'src/leap/soledad/common/couch')
-rw-r--r--src/leap/soledad/common/couch/state.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/leap/soledad/common/couch/state.py b/src/leap/soledad/common/couch/state.py
index 38098e3f..5614b32f 100644
--- a/src/leap/soledad/common/couch/state.py
+++ b/src/leap/soledad/common/couch/state.py
@@ -93,9 +93,8 @@ def _check_db_schema_version(url, db, auth, agent=None):
def _stop(failure, reactor):
- exception = failure.value.subFailure.value
logger.error("Failure while checking schema versions: %r - %s"
- % (exception, exception.message))
+ % (failure, failure.message))
reactor.addSystemEventTrigger('after', 'shutdown', os._exit, 1)
reactor.stop()
@@ -124,9 +123,9 @@ def check_schema_versions(couch_url, agent=None, reactor=reactor):
if not db.startswith('user-'):
continue
d = semaphore.run(_check_db_schema_version, url, db, auth, agent=agent)
+ d.addErrback(_stop, reactor=reactor)
deferreds.append(d)
d = defer.gatherResults(deferreds, consumeErrors=True)
- d.addErrback(_stop, reactor=reactor)
yield d