Skip to content

Commit 5d4edb5

Browse files
committed
fix: list-strategies shouldn't fail when no strategy is found
closes freqtrade#12124
1 parent 6dccab9 commit 5d4edb5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

freqtrade/commands/list_commands.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ def start_list_strategies(args: dict[str, Any]) -> None:
146146
strategy_objs = StrategyResolver.search_all_objects(
147147
config, not args["print_one_column"], config.get("recursive_strategy_search", False)
148148
)
149+
if not strategy_objs:
150+
logger.warning("No strategies found.")
151+
return
149152
# Sort alphabetically
150153
strategy_objs = sorted(strategy_objs, key=lambda x: x["name"])
151154
for obj in strategy_objs:

0 commit comments

Comments
 (0)