don't check negated if both trees are handled

This commit is contained in:
Matthias Voppichler 2018-03-31 17:28:54 +02:00
parent 8a83e050d0
commit 2f40e23dcc

View File

@ -71,14 +71,14 @@ def file_dump_json(filename, data, is_zip=False) -> None:
:param data: JSON Data to save :param data: JSON Data to save
:return: :return:
""" """
if not is_zip: if is_zip:
with open(filename, 'w') as fp:
json.dump(data, fp, default=str)
else:
if not filename.endswith('.gz'): if not filename.endswith('.gz'):
filename = filename + '.gz' filename = filename + '.gz'
with gzip.open(filename, 'w') as fp: with gzip.open(filename, 'w') as fp:
json.dump(data, fp, default=str) 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: def format_ms_time(date: str) -> str: