From 3eca80217c741f226a2dafa2c7db69cac2561de9 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 3 Nov 2019 10:18:46 +0100 Subject: [PATCH] Don't check exchange for Utils commands --- freqtrade/configuration/check_exchange.py | 2 +- tests/test_configuration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/configuration/check_exchange.py b/freqtrade/configuration/check_exchange.py index 5d963db47..9e7ce70a9 100644 --- a/freqtrade/configuration/check_exchange.py +++ b/freqtrade/configuration/check_exchange.py @@ -21,7 +21,7 @@ def check_exchange(config: Dict[str, Any], check_for_bad: bool = True) -> bool: and thus is not known for the Freqtrade at all. """ - if (config['runmode'] in [RunMode.PLOT, RunMode.UTIL_NO_EXCHANGE] + if (config['runmode'] in [RunMode.PLOT, RunMode.UTIL_NO_EXCHANGE, RunMode.OTHER] and not config.get('exchange', {}).get('name')): # Skip checking exchange in plot mode, since it requires no exchange return True diff --git a/tests/test_configuration.py b/tests/test_configuration.py index 545dd5df4..6cb6ca758 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -545,7 +545,7 @@ def test_check_exchange(default_conf, caplog) -> None: # Test no exchange... default_conf.get('exchange').update({'name': ''}) - default_conf['runmode'] = RunMode.OTHER + default_conf['runmode'] = RunMode.UTIL_EXCHANGE with pytest.raises(OperationalException, match=r'This command requires a configured exchange.*'): check_exchange(default_conf)