mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-02-03 21:00:25 +00:00
chore: Implement safeguard against non-existing strategy files
This commit is contained in:
@@ -95,6 +95,9 @@ def store_backtest_results(
|
||||
# Store the strategy file and its parameters
|
||||
strategy_buf = BytesIO()
|
||||
strategy_path = Path(strategy_file)
|
||||
if not strategy_path.is_file():
|
||||
logger.warning(f"Strategy file '{strategy_path}' does not exist. Skipping.")
|
||||
continue
|
||||
with strategy_path.open("rb") as strategy_file_obj:
|
||||
strategy_buf.write(strategy_file_obj.read())
|
||||
strategy_buf.seek(0)
|
||||
|
||||
Reference in New Issue
Block a user