From 06024b0ab0692b0338207d596191cc16f51f43b4 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 25 Aug 2019 14:30:02 +0200 Subject: [PATCH] Fix zipfile handling --- freqtrade/misc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/freqtrade/misc.py b/freqtrade/misc.py index c9fbda17e..b8e89b040 100644 --- a/freqtrade/misc.py +++ b/freqtrade/misc.py @@ -72,8 +72,10 @@ def json_load(datafile: IO): def file_load_json(file): - gzipfile = file.with_suffix(file.suffix + '.gz') - + if file.suffix != ".gz": + gzipfile = file.with_suffix(file.suffix + '.gz') + else: + gzipfile = file # Try gzip file first, otherwise regular json file. if gzipfile.is_file(): logger.debug('Loading ticker data from file %s', gzipfile)