mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-24 02:37:05 +00:00
Make reading of previous status check result more robust (#2347)
This commit is contained in:
parent
293d56c781
commit
785c337fb3
@ -965,7 +965,10 @@ def run_and_output_changes(env, pool):
|
|||||||
cache_fn = "/var/cache/mailinabox/status_checks.json"
|
cache_fn = "/var/cache/mailinabox/status_checks.json"
|
||||||
if os.path.exists(cache_fn):
|
if os.path.exists(cache_fn):
|
||||||
with open(cache_fn, 'r') as f:
|
with open(cache_fn, 'r') as f:
|
||||||
prev = json.load(f)
|
try:
|
||||||
|
prev = json.load(f)
|
||||||
|
except json.JSONDecodeError:
|
||||||
|
prev = []
|
||||||
|
|
||||||
# Group the serial output into categories by the headings.
|
# Group the serial output into categories by the headings.
|
||||||
def group_by_heading(lines):
|
def group_by_heading(lines):
|
||||||
|
Loading…
Reference in New Issue
Block a user