Skip to content

Commit

Permalink
bug fix if arg given symbol missing
Browse files Browse the repository at this point in the history
  • Loading branch information
enarjord committed Sep 6, 2024
1 parent c3d74ab commit 7a0d5c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def add_argparse_args_to_config(config, args):
if value is None:
continue
if key == "symbols":
symbols = sorted([coin_to_symbol(x) for x in set(value.split(","))])
symbols = sorted([xf for x in set(value.split(",")) if (xf := coin_to_symbol(x))])
if symbols != sorted(set(config["live"]["approved_coins"])):
logging.info(f"new symbols: {symbols}")
config["live"]["approved_coins"] = [coin_to_symbol(x) for x in symbols]
Expand Down

0 comments on commit 7a0d5c1

Please sign in to comment.