Fix zipfile handling
This commit is contained in:
parent
6e952a0aa8
commit
06024b0ab0
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user