diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-03-26 12:18:34 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-03-26 12:18:34 -0300 |
commit | d13c6b2567803d73c8c2fd33495c081ce736eb96 (patch) | |
tree | dab64489feb5b906d9ec980981a8454174c9c8f8 /common | |
parent | bd5110af83bce10392b971db71f8e3719df0d75c (diff) | |
parent | f5b30eb5ae4ac5cc61163e0167e92827310d0c13 (diff) |
Merge remote-tracking branch 'refs/remotes/drebs/bug/5387_remove-check-for-design-docs' into develop
Diffstat (limited to 'common')
-rw-r--r-- | common/changes/bug_5387_remove-check-for-ddocs-on-couch-server-state | 1 | ||||
-rw-r--r-- | common/src/leap/soledad/common/couch.py | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/common/changes/bug_5387_remove-check-for-ddocs-on-couch-server-state b/common/changes/bug_5387_remove-check-for-ddocs-on-couch-server-state new file mode 100644 index 00000000..71c0cac2 --- /dev/null +++ b/common/changes/bug_5387_remove-check-for-ddocs-on-couch-server-state @@ -0,0 +1 @@ + o Remove check for design docs on couch server state initialization (#5387). diff --git a/common/src/leap/soledad/common/couch.py b/common/src/leap/soledad/common/couch.py index a4f30cf3..c0ebc425 100644 --- a/common/src/leap/soledad/common/couch.py +++ b/common/src/leap/soledad/common/couch.py @@ -377,7 +377,7 @@ class CouchDatabase(CommonBackend): self._release_fun() @classmethod - def open_database(cls, url, create): + def open_database(cls, url, create, ensure_ddocs=False): """ Open a U1DB database using CouchDB as backend. @@ -385,6 +385,8 @@ class CouchDatabase(CommonBackend): :type url: str :param create: should the replica be created if it does not exist? :type create: bool + :param ensure_ddocs: Ensure that the design docs exist on server. + :type ensure_ddocs: bool :return: the database instance :rtype: CouchDatabase @@ -401,7 +403,7 @@ class CouchDatabase(CommonBackend): except ResourceNotFound: if not create: raise DatabaseDoesNotExist() - return cls(url, dbname) + return cls(url, dbname, ensure_ddocs=ensure_ddocs) def __init__(self, url, dbname, replica_uid=None, full_commit=True, session=None, ensure_ddocs=True): @@ -1464,7 +1466,8 @@ class CouchServerState(ServerState): """ return CouchDatabase.open_database( self._couch_url + '/' + dbname, - create=False) + create=False, + ensure_ddocs=False) def ensure_database(self, dbname): """ |