From 8a030e7fc01566191ce747767efb2a6a1b83974f Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 27 Dec 2019 11:08:47 +0100 Subject: [PATCH] Use exists instead of is_file --- freqtrade/data/datahandlers/jsondatahandler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/data/datahandlers/jsondatahandler.py b/freqtrade/data/datahandlers/jsondatahandler.py index 1a26671b9..9f3468d30 100644 --- a/freqtrade/data/datahandlers/jsondatahandler.py +++ b/freqtrade/data/datahandlers/jsondatahandler.py @@ -65,7 +65,7 @@ class JsonDataHandler(IDataHandler): :return: DataFrame with ohlcv data, or empty DataFrame """ filename = self._pair_data_filename(self._datadir, pair, timeframe) - if not filename.is_file(): + if not filename.exists(): return DataFrame(columns=self._columns) pairdata = read_json(filename, orient='values') pairdata.columns = self._columns @@ -149,7 +149,7 @@ class JsonDataHandler(IDataHandler): :return: True when deleted, false if file did not exist. """ filename = self._pair_trades_filename(self._datadir, pair) - if filename.is_file(): + if filename.exists(): filename.unlink() return True return False