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
1 changed files with 1 additions and 1 deletions

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"