diff --git a/freqtrade/configuration/configuration.py b/freqtrade/configuration/configuration.py index 82e93fb91..013b1ff1c 100644 --- a/freqtrade/configuration/configuration.py +++ b/freqtrade/configuration/configuration.py @@ -238,20 +238,13 @@ class Configuration: ) if not config.get("exportdirectory"): config["exportdirectory"] = config["user_data_dir"] / "backtest_results" - if not config.get("exportfilename"): - config["exportfilename"] = None + + config["exportfilename"] = config.get("exportfilename", None) if config.get("exportfilename"): # ensure exportfilename is a Path object config["exportfilename"] = Path(config["exportfilename"]) config["exportdirectory"] = Path(config["exportdirectory"]) - if self.args.get("show_sensitive"): - logger.warning( - "Sensitive information will be shown in the upcoming output. " - "Please make sure to never share this output without redacting " - "the information yourself." - ) - def _process_optimize_options(self, config: Config) -> None: # This will override the strategy configuration self._args_to_config( @@ -319,6 +312,13 @@ class Configuration: self._process_datadir_options(config) + if self.args.get("show_sensitive"): + logger.warning( + "Sensitive information will be shown in the upcoming output. " + "Please make sure to never share this output without redacting " + "the information yourself." + ) + self._args_to_config( config, argname="strategy_list",