Skip to content
Snippets Groups Projects
Unverified Commit e8664be1 authored by drebs's avatar drebs
Browse files

[bug] properly log missing schema version in config doc

parent 00a201d0
Branches
Tags
1 merge request!163Fix logging
...@@ -77,9 +77,13 @@ def _check_db_schema_version(url, db, auth, agent=None): ...@@ -77,9 +77,13 @@ def _check_db_schema_version(url, db, auth, agent=None):
elif res.code == 200: elif res.code == 200:
config_doc = yield res.json() 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: if config_doc[SCHEMA_VERSION_KEY] != SCHEMA_VERSION:
logger.error( logger.error(
"Unsupported database schema in database %s" % db) "Unsupported database schema in database: %s" % db)
raise WrongCouchSchemaVersionError(db) raise WrongCouchSchemaVersionError(db)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment