From 4b32e8e01a627a75f0d6f5cc0de41e325065b2f6 Mon Sep 17 00:00:00 2001 From: vrde Date: Wed, 6 Apr 2016 16:15:17 +0200 Subject: [PATCH] Use autoconfigure on every command --- bigchaindb/commands/bigchain.py | 6 +++--- bigchaindb/config_utils.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bigchaindb/commands/bigchain.py b/bigchaindb/commands/bigchain.py index 6e2bf1d3..fddcce52 100644 --- a/bigchaindb/commands/bigchain.py +++ b/bigchaindb/commands/bigchain.py @@ -70,7 +70,7 @@ def run_configure(args, skip_if_exists=False): def run_init(args): """Initialize the database""" - bigchaindb.config_utils.file_config(args.config) + bigchaindb.config_utils.autoconfigure(filename=args.config, force=True) # TODO Provide mechanism to: # 1. prompt the user to inquire whether they wish to drop the db # 2. force the init, (e.g., via -f flag) @@ -83,14 +83,14 @@ def run_init(args): def run_drop(args): """Drop the database""" - bigchaindb.config_utils.file_config(args.config) + bigchaindb.config_utils.autoconfigure(filename=args.config, force=True) db.drop(assume_yes=args.yes) def run_start(args): """Start the processes to run the node""" # run_configure(args, skip_if_exists=True) - bigchaindb.config_utils.file_config(args.config) + bigchaindb.config_utils.autoconfigure(filename=args.config, force=True) try: db.init() except DatabaseAlreadyExists: diff --git a/bigchaindb/config_utils.py b/bigchaindb/config_utils.py index f165334a..19caef90 100644 --- a/bigchaindb/config_utils.py +++ b/bigchaindb/config_utils.py @@ -189,7 +189,7 @@ def autoconfigure(filename=None, config=None, force=False): been initialized.""" if not force and bigchaindb.config.get('CONFIGURED'): - logger.info('System already configured, skipping autoconfiguration') + logger.debug('System already configured, skipping autoconfiguration') return newconfig = env_config(bigchaindb.config)