mirror of
https://github.com/craigerl/aprsd.git
synced 2024-11-18 06:11:49 -05:00
Fixed Keepalive access to email stats
this patch fixes a potential issue accessing an email stat that might not be set yet.
This commit is contained in:
parent
8d86764c23
commit
cb0cfeea0b
@ -33,7 +33,7 @@ class KeepAliveThread(APRSDThread):
|
||||
|
||||
if "EmailStats" in stats_json:
|
||||
email_stats = stats_json["EmailStats"]
|
||||
if email_stats["last_check_time"]:
|
||||
if email_stats.get("last_check_time"):
|
||||
email_thread_time = utils.strfdelta(now - email_stats["last_check_time"])
|
||||
else:
|
||||
email_thread_time = "N/A"
|
||||
|
Loading…
Reference in New Issue
Block a user