Set default-db url in configuration, not arguments
* Fixes a bug in plot_dataframe.py (#1217) * db_url is eventually overwritten here anyway.
This commit is contained in:
parent
14e21765f2
commit
176bae2d59
@ -119,7 +119,6 @@ class Arguments(object):
|
|||||||
help='Override trades database URL, this is useful if dry_run is enabled'
|
help='Override trades database URL, this is useful if dry_run is enabled'
|
||||||
' or in custom deployments (default: %(default)s)',
|
' or in custom deployments (default: %(default)s)',
|
||||||
dest='db_url',
|
dest='db_url',
|
||||||
default=constants.DEFAULT_DB_PROD_URL,
|
|
||||||
type=str,
|
type=str,
|
||||||
metavar='PATH',
|
metavar='PATH',
|
||||||
)
|
)
|
||||||
|
@ -110,9 +110,12 @@ class Configuration(object):
|
|||||||
'(not applicable with Backtesting and Hyperopt)'
|
'(not applicable with Backtesting and Hyperopt)'
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.args.db_url != constants.DEFAULT_DB_PROD_URL:
|
if self.args.db_url and self.args.db_url != constants.DEFAULT_DB_PROD_URL:
|
||||||
config.update({'db_url': self.args.db_url})
|
config.update({'db_url': self.args.db_url})
|
||||||
logger.info('Parameter --db-url detected ...')
|
logger.info('Parameter --db-url detected ...')
|
||||||
|
else:
|
||||||
|
# Set default here
|
||||||
|
config.update({'db_url': constants.DEFAULT_DB_PROD_URL})
|
||||||
|
|
||||||
if config.get('dry_run', False):
|
if config.get('dry_run', False):
|
||||||
logger.info('Dry run is enabled')
|
logger.info('Dry run is enabled')
|
||||||
|
Loading…
Reference in New Issue
Block a user