From 0277cd82ea66cd019138f0f45caaeed3b0afc187 Mon Sep 17 00:00:00 2001 From: hroff-1902 Date: Mon, 16 Dec 2019 23:25:57 +0300 Subject: [PATCH] Make mypy happy --- freqtrade/data/history.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/freqtrade/data/history.py b/freqtrade/data/history.py index 79500c512..2c01f9f48 100644 --- a/freqtrade/data/history.py +++ b/freqtrade/data/history.py @@ -295,6 +295,11 @@ def _download_pair_history(datadir: Path, :param timerange: range of time to download :return: bool with success state """ + if not exchange: + raise OperationalException( + "Exchange needs to be initialized when downloading pair history data" + ) + try: logger.info( f'Download history data for pair: "{pair}", timeframe: {timeframe} '