From 9c6fe87129936eb91fdc9664c6010db56da508b6 Mon Sep 17 00:00:00 2001 From: Nikolay Mahotkin Date: Thu, 11 Sep 2014 13:25:46 +0400 Subject: [PATCH] Add check on config file in sync_db script Change-Id: Id8ce0ea35dd6bf05caca2e5133c855157e11c828 --- tools/sync_db.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/sync_db.py b/tools/sync_db.py index a9d24dd0..db5d71fd 100644 --- a/tools/sync_db.py +++ b/tools/sync_db.py @@ -26,6 +26,11 @@ LOG = logging.getLogger(__name__) def main(): config.parse_args() + + if len(CONF.config_file) == 0: + print "Usage: sync_db --config-file " + return exit(1) + logging.setup('Mistral') db_api.setup_db()