diff options
author | drebs <drebs@leap.se> | 2013-01-03 17:16:19 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-01-03 17:16:19 -0200 |
commit | 9d82ab69877378382efbf4d73afb334b23ab56f6 (patch) | |
tree | 4c9f266b4d9ed9625facba0cae1ec269c666d8ce /src/leap/soledad/backends | |
parent | 6803572af018cb31ce4799b65af6016ebb89979e (diff) |
LeapDatabase passes HTTPDatabase tests.
Diffstat (limited to 'src/leap/soledad/backends')
-rw-r--r-- | src/leap/soledad/backends/leap_backend.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/leap/soledad/backends/leap_backend.py b/src/leap/soledad/backends/leap_backend.py index ced8734c..a79fc9e7 100644 --- a/src/leap/soledad/backends/leap_backend.py +++ b/src/leap/soledad/backends/leap_backend.py @@ -8,6 +8,8 @@ from u1db.remote.http_target import HTTPSyncTarget from u1db.remote.http_database import HTTPDatabase from leap.soledad.util import GPGWrapper +import uuid + class NoDefaultKey(Exception): pass @@ -70,6 +72,10 @@ class LeapDatabase(HTTPDatabase): db._delete() db.close() + def _allocate_doc_id(self): + """Generate a unique identifier for this document.""" + return 'D-' + uuid.uuid4().hex # 'D-' stands for document + def get_sync_target(self): st = LeapSyncTarget(self._url.geturl()) st._creds = self._creds |