summaryrefslogtreecommitdiff
path: root/src/leap/soledad
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/soledad')
-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)