1
0
mirror of https://github.com/mbirth/tcl_ota_check.git synced 2024-09-19 14:23:27 +01:00

Detect broken JSON and download new.

This commit is contained in:
Markus Birth 2018-03-01 01:42:59 +01:00
parent 16d33b0cb6
commit 995b451d11
Signed by: mbirth
GPG Key ID: A9928D7A098C3A9A

View File

@ -29,7 +29,7 @@ def _load_local_devicelist():
need_download = False
with open(DEVICELIST_FILE, "rt") as dlfile:
return json.load(dlfile), need_download
except FileNotFoundError:
except (FileNotFoundError, json.decoder.JSONDecodeError):
return None, True
def _download_devicelist(doit: bool):