From cb0cfeea0bedba8512b9da0629d0e4394c08e193 Mon Sep 17 00:00:00 2001 From: Hemna Date: Tue, 16 Apr 2024 13:09:33 -0400 Subject: [PATCH] Fixed Keepalive access to email stats this patch fixes a potential issue accessing an email stat that might not be set yet. --- aprsd/threads/keep_alive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aprsd/threads/keep_alive.py b/aprsd/threads/keep_alive.py index 98e2208..3b1555a 100644 --- a/aprsd/threads/keep_alive.py +++ b/aprsd/threads/keep_alive.py @@ -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"