1
0
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:
Hemna 2024-04-16 13:09:33 -04:00
parent 8d86764c23
commit cb0cfeea0b

View File

@ -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"