From 2f40e23dcc870dbbe309f606c731bd88694b5d56 Mon Sep 17 00:00:00 2001 From: Matthias Voppichler Date: Sat, 31 Mar 2018 17:28:54 +0200 Subject: [PATCH] don't check negated if both trees are handled --- freqtrade/misc.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/freqtrade/misc.py b/freqtrade/misc.py index fac379c18..7546dba8f 100644 --- a/freqtrade/misc.py +++ b/freqtrade/misc.py @@ -71,14 +71,14 @@ def file_dump_json(filename, data, is_zip=False) -> None: :param data: JSON Data to save :return: """ - if not is_zip: - with open(filename, 'w') as fp: - json.dump(data, fp, default=str) - else: + if is_zip: if not filename.endswith('.gz'): filename = filename + '.gz' with gzip.open(filename, 'w') as fp: json.dump(data, fp, default=str) + else: + with open(filename, 'w') as fp: + json.dump(data, fp, default=str) def format_ms_time(date: str) -> str: