diff --git a/freqtrade/configuration/arguments.py b/freqtrade/configuration/arguments.py index a8cd6686b..addbfcf67 100644 --- a/freqtrade/configuration/arguments.py +++ b/freqtrade/configuration/arguments.py @@ -47,11 +47,10 @@ class Arguments(object): """ Arguments Class. Manage the arguments received by the cli """ - def __init__(self, args: Optional[List[str]], no_default_config: bool = False) -> None: + def __init__(self, args: Optional[List[str]]) -> None: self.args = args self._parsed_arg: Optional[argparse.Namespace] = None self.parser = argparse.ArgumentParser(description='Free, open source crypto trading bot') - self._no_default_config = no_default_config def _load_args(self) -> None: self._build_args(optionlist=ARGS_MAIN) @@ -77,7 +76,7 @@ class Arguments(object): # Workaround issue in argparse with action='append' and default value # (see https://bugs.python.org/issue16399) # Allow no-config for certain commands (like downloading / plotting) - if (not self._no_default_config and parsed_arg.config is None + if (parsed_arg.config is None and not ('subparser' in parsed_arg and parsed_arg.subparser in NO_CONF_REQURIED)): parsed_arg.config = [constants.DEFAULT_CONFIG]