diff options
author | drebs <drebs@leap.se> | 2013-01-14 13:23:44 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-01-14 13:23:44 -0200 |
commit | 7c3b6c5c0fa7a8bd1e15a302bfe0d30e347316be (patch) | |
tree | 6596c2892013e51c6531e253786d161643818d68 | |
parent | ecbe66c10805f6f4866c27fa17952cc5f5ca4a2c (diff) |
CouchSyncTarget works as a LocalSyncTarget.
-rw-r--r-- | src/leap/soledad/backends/couch.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/leap/soledad/backends/couch.py b/src/leap/soledad/backends/couch.py index f071cfad..5cde4805 100644 --- a/src/leap/soledad/backends/couch.py +++ b/src/leap/soledad/backends/couch.py @@ -1,7 +1,8 @@ +import sys import uuid from base64 import b64encode, b64decode from u1db import errors -from u1db.remote.http_target import HTTPSyncTarget +from u1db.sync import LocalSyncTarget from couchdb.client import Server, Document as CouchDocument from couchdb.http import ResourceNotFound from leap.soledad.backends.objectstore import ObjectStore @@ -108,7 +109,6 @@ class CouchDatabase(ObjectStore): def sync(self, url, creds=None, autocreate=True): from u1db.sync import Synchronizer - from u1db.remote.http_target import CouchSyncTarget return Synchronizer(self, CouchSyncTarget(url, creds=creds)).sync( autocreate=autocreate) @@ -150,7 +150,8 @@ class CouchDatabase(ObjectStore): def delete_database(self): del(self._server[self._dbname]) -class CouchSyncTarget(HTTPSyncTarget): + +class CouchSyncTarget(LocalSyncTarget): def get_sync_info(self, source_replica_uid): source_gen, source_trans_id = self._db._get_replica_gen_and_trans_id( @@ -168,4 +169,3 @@ class CouchSyncTarget(HTTPSyncTarget): source_replica_uid, source_replica_generation, source_replica_transaction_id) - |