diff options
author | drebs <drebs@leap.se> | 2015-08-20 16:08:17 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2015-08-20 16:09:55 -0300 |
commit | 1da0dcad540a05828437b2ba0ead617ac40aeccc (patch) | |
tree | f2bdf5e6112561af074d4bd3f1aeb765ba7c3a5e | |
parent | cd85aa6b66ddc3ec2749e7c44fa4a836c9faf4f4 (diff) |
[bug] always emit end-of-sync event
-rw-r--r-- | client/src/leap/soledad/client/api.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/leap/soledad/client/api.py b/client/src/leap/soledad/client/api.py index 7afc9c6c..a6a98551 100644 --- a/client/src/leap/soledad/client/api.py +++ b/client/src/leap/soledad/client/api.py @@ -708,8 +708,6 @@ class Soledad(object): filtered = list(chain(*r)) plugin.process_received_docs(filtered) - soledad_events.emit( - soledad_events.SOLEDAD_DONE_DATA_SYNC, self.uuid) return local_gen def _sync_errback(failure): @@ -719,7 +717,13 @@ class Soledad(object): logger.error(msg) return failure + def _emit_done_data_sync(passthrough): + soledad_events.emit( + soledad_events.SOLEDAD_DONE_DATA_SYNC, self.uuid) + return passthrough + d.addCallbacks(_sync_callback, _sync_errback) + d.addBoth(_emit_done_data_sync) return d @property |