diff options
author | Ruben Pollan <meskio@sindominio.net> | 2015-10-06 16:56:40 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2015-10-06 16:56:40 +0200 |
commit | d20f232517035219faa597943a3bbc2c3d483160 (patch) | |
tree | 663eb602d0691836fcb77f073a91098117a249d2 | |
parent | 16ca8e6b7514dab3d2135c2c407780761bcd10b7 (diff) | |
parent | 2a891aaf38c35534d496b660d71369dd77ff381b (diff) |
Merge branch 'leapcode/pr/287' into develop
- Release: 0.8.0
-rw-r--r-- | client/changes/bug_missing_design_doc_handler | 1 | ||||
-rw-r--r-- | client/src/leap/soledad/client/sync.py | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/client/changes/bug_missing_design_doc_handler b/client/changes/bug_missing_design_doc_handler new file mode 100644 index 00000000..72e42b85 --- /dev/null +++ b/client/changes/bug_missing_design_doc_handler @@ -0,0 +1 @@ +o Handle missing design doc at GET (get_sync_info). Soledad server can handle this during sync. diff --git a/client/src/leap/soledad/client/sync.py b/client/src/leap/soledad/client/sync.py index 225d3e2d..2276db2a 100644 --- a/client/src/leap/soledad/client/sync.py +++ b/client/src/leap/soledad/client/sync.py @@ -22,6 +22,7 @@ import logging from twisted.internet import defer from u1db import errors +from leap.soledad.common.errors import MissingDesignDocError from u1db.sync import Synchronizer @@ -73,8 +74,9 @@ class SoledadSynchronizer(Synchronizer): (self.target_replica_uid, target_gen, target_trans_id, target_my_gen, target_my_trans_id) = yield \ sync_target.get_sync_info(self.source._replica_uid) - except errors.DatabaseDoesNotExist: + except (errors.DatabaseDoesNotExist, MissingDesignDocError) as e: logger.debug("Database isn't ready on server. Will be created.") + logger.debug("Reason: %s", e.__class__) self.target_replica_uid = None target_gen, target_trans_id = 0, '' target_my_gen, target_my_trans_id = 0, '' |