From 34fd81cd510524de7c8efda2053c1523d6e26b50 Mon Sep 17 00:00:00 2001 From: Brian Read Date: Wed, 18 Jun 2025 06:29:38 +0100 Subject: [PATCH] Fix crash when no emails found --- root/usr/bin/mailstats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/usr/bin/mailstats.py b/root/usr/bin/mailstats.py index 6664722..f55ad70 100644 --- a/root/usr/bin/mailstats.py +++ b/root/usr/bin/mailstats.py @@ -1342,12 +1342,12 @@ if __name__ == "__main__": total_qpsmtpd = 0 total_sqpsmtpd = 0 total_uqpsmtpd = 0 + count_ignored_mailstats = 0; if sorted_len > 0: if isThonny: # Initial call to logging.error( the progress bar print_progress_bar(0, sorted_len, prefix='Progress:', suffix='Complete', length=50) - count_ignored_mailstats = 0; for timestamp, data in sorted_log_dict.items(): i += 1 totalexamined += 1