summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2017-11-21 20:37:49 -0200
committerdrebs <drebs@riseup.net>2017-11-22 08:23:59 -0200
commite8664be1edd380e3f0cf1ddea977da965ef38715 (patch)
tree2c74e8d4eb3201ae9167a27cdd4d19a05f090fbb /src
parent00a201d0f3fb4796286300fe7b16eda189afef7a (diff)
[bug] properly log missing schema version in config doc
Diffstat (limited to 'src')
-rw-r--r--src/leap/soledad/common/couch/check.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leap/soledad/common/couch/check.py b/src/leap/soledad/common/couch/check.py
index 93fc1d66..c82201bb 100644
--- a/src/leap/soledad/common/couch/check.py
+++ b/src/leap/soledad/common/couch/check.py
@@ -77,9 +77,13 @@ def _check_db_schema_version(url, db, auth, agent=None):
elif res.code == 200:
config_doc = yield res.json()
+ if SCHEMA_VERSION_KEY not in config_doc:
+ logger.error(
+ "Database has config document but no schema version: %s" % db)
+ raise WrongCouchSchemaVersionError(db)
if config_doc[SCHEMA_VERSION_KEY] != SCHEMA_VERSION:
logger.error(
- "Unsupported database schema in database %s" % db)
+ "Unsupported database schema in database: %s" % db)
raise WrongCouchSchemaVersionError(db)