summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-01-14 13:23:44 -0200
committerdrebs <drebs@leap.se>2013-01-14 13:23:44 -0200
commit873d2641ee27446af41aeb0134b0ba1b1012754b (patch)
tree964dafed55dd90cc63533d4bd826c1edd20113a9
parentb94e6a32860ba9e3ec4103ffd84aa01f4e741f15 (diff)
CouchSyncTarget works as a LocalSyncTarget.
-rw-r--r--backends/couch.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/backends/couch.py b/backends/couch.py
index f071cfad..5cde4805 100644
--- a/backends/couch.py
+++ b/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)
-