From d6d3dfdcc2c22fb256596b5f9e2ef429586331cf Mon Sep 17 00:00:00 2001 From: misagh Date: Fri, 21 Sep 2018 22:06:09 +0200 Subject: [PATCH] =?UTF-8?q?removing=20=E2=80=9Cif=20ujson=5Ffound=20is=20n?= =?UTF-8?q?ot=20None:=E2=80=9D=20as=20=E2=80=9Cjson=E2=80=9D=20refers=20to?= =?UTF-8?q?=20=E2=80=9Cujson=E2=80=9D=20if=20it=20exists?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- freqtrade/optimize/__init__.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/freqtrade/optimize/__init__.py b/freqtrade/optimize/__init__.py index aeb56811e..7e44b3bac 100644 --- a/freqtrade/optimize/__init__.py +++ b/freqtrade/optimize/__init__.py @@ -77,17 +77,11 @@ def load_tickerdata_file( if os.path.isfile(gzipfile): logger.debug('Loading ticker data from file %s', gzipfile) with gzip.open(gzipfile) as tickerdata: - if ujson_found is not None: - pairdata = ujson.load(tickerdata, precise_float=True) - else: - pairdata = json.load(tickerdata) + pairdata = json.load(tickerdata) elif os.path.isfile(file): logger.debug('Loading ticker data from file %s', file) with open(file) as tickerdata: - if ujson_found is not None: - pairdata = ujson.load(tickerdata, precise_float=True) - else: - pairdata = json.load(tickerdata) + pairdata = json.load(tickerdata) else: return None @@ -183,10 +177,7 @@ def load_cached_data_for_updating(filename: str, # read the cached file if os.path.isfile(filename): with open(filename, "rt") as file: - if ujson_found is not None: - data = ujson.load(file, precise_float=True) - else: - data = json.load(file) + data = json.load(file) # remove the last item, because we are not sure if it is correct # it could be fetched when the candle was incompleted if data: