diff options
author | drebs <drebs@leap.se> | 2013-05-09 11:55:05 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-05-09 11:55:05 -0300 |
commit | 028cf283c1dae800b2ea70a05201cb9c696be973 (patch) | |
tree | d1bb979e8712542afb25873a72ba5d156306ad22 /src | |
parent | e507bc2b31d0405db3901764ce5254c1a7254ff3 (diff) |
Fix URLs of remote replicas.
Diffstat (limited to 'src')
-rw-r--r-- | src/leap/soledad/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/leap/soledad/__init__.py b/src/leap/soledad/__init__.py index 1ef18174..2a7b945e 100644 --- a/src/leap/soledad/__init__.py +++ b/src/leap/soledad/__init__.py @@ -30,6 +30,7 @@ import os import string import binascii import logging +import urlparse try: import simplejson as json except ImportError: @@ -417,7 +418,7 @@ class Soledad(object): Return an instance of the shared recovery database object. """ return SoledadSharedDatabase.open_database( - self.server_url, + urlparse.urljoin(self.server_url, 'shared'), False, # TODO: eliminate need to create db here. creds=self._creds) @@ -721,7 +722,9 @@ class Soledad(object): performed. @rtype: str """ - local_gen = self._db.sync(self.server_url, creds=self._creds, autocreate=True) + local_gen = self._db.sync( + urlparse.urljoin(self.server_url, 'user-%s' % self._uuid), + creds=self._creds, autocreate=True) events.signal(events.events_pb2.SOLEDAD_DONE_DATA_SYNC, self._uuid) return local_gen |