Simplify, and avoid assignment that may not be used

This commit is contained in:
Sylvain Bellemare 2016-02-14 20:51:06 +01:00
parent a766fc60b7
commit ab2a0f3a82

View File

@ -36,13 +36,12 @@ def run_configure(args, skip_if_exists=False):
skip_if_exists (bool): skip the function if a conf file already exists
"""
config_path = args.config or bigchaindb.config_utils.CONFIG_DEFAULT_PATH
proceed = args.yes
config_file_exists = os.path.exists(config_path)
if config_file_exists and skip_if_exists:
return
if config_file_exists and not proceed:
if config_file_exists and not args.yes:
want = input('Config file `{}` exists, do you want to override it? '
'(cannot be undone) [y/n]: '.format(config_path))
if not want: