diff options
author | Kali Kaneko <kali@leap.se> | 2015-11-17 20:49:38 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-11-17 20:49:38 -0400 |
commit | aa6a34bc4ac5962dacaa5908778e444fe5aae3d7 (patch) | |
tree | d461ef588b88b1457dce537a0440660f467b6068 /client | |
parent | 489d851e88151cd51df6725330515e6b8a2ea1b2 (diff) | |
parent | 46678a7aecb98dbdc20846477c7f5110f3c63861 (diff) |
Merge branch 'develop' into debian/platform-0.8
Diffstat (limited to 'client')
-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..626ad2e5 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.couch.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, '' |