mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Remove smelly code
This commit is contained in:
parent
cd6bb18f18
commit
f5da2af872
@ -59,8 +59,6 @@ def run_configure(args, skip_if_exists=False):
|
||||
skip_if_exists (bool): skip the function if a config file already exists
|
||||
"""
|
||||
config_path = args.config or bigchaindb.config_utils.CONFIG_DEFAULT_PATH
|
||||
bigchaindb.config_utils.autoconfigure(filename=False, force=True)
|
||||
|
||||
|
||||
config_file_exists = False
|
||||
# if the config path is `-` then it's stdout
|
||||
@ -76,9 +74,13 @@ def run_configure(args, skip_if_exists=False):
|
||||
if want != 'y':
|
||||
return
|
||||
|
||||
# Patch the default configuration with the new values
|
||||
conf = copy.deepcopy(bigchaindb.config)
|
||||
del conf['CONFIGURED']
|
||||
|
||||
# Patch the default configuration with the new values
|
||||
conf = bigchaindb.config_utils.update(
|
||||
conf,
|
||||
bigchaindb.config_utils.env_config(bigchaindb.config))
|
||||
|
||||
|
||||
print('Generating keypair', file=sys.stderr)
|
||||
conf['keypair']['private'], conf['keypair']['public'] = \
|
||||
@ -173,7 +175,6 @@ def run_start(args):
|
||||
def _run_load(tx_left, stats):
|
||||
logstats.thread.start(stats)
|
||||
client = temp_client()
|
||||
# b = bigchaindb.Bigchain()
|
||||
|
||||
while True:
|
||||
tx = client.create()
|
||||
|
@ -54,8 +54,6 @@ def start_rethinkdb():
|
||||
# The last `line` contains info about the error.
|
||||
raise StartupError(line)
|
||||
|
||||
proc.kill()
|
||||
|
||||
|
||||
def start(parser, scope):
|
||||
"""Utility function to execute a subcommand.
|
||||
|
@ -92,9 +92,6 @@ def file_config(filename=None):
|
||||
"""
|
||||
logger.debug('On entry into file_config(), filename = {}'.format(filename))
|
||||
|
||||
if filename is False:
|
||||
return {}
|
||||
|
||||
if filename is None:
|
||||
filename = CONFIG_DEFAULT_PATH
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user