From 048bad181bbc746cc81dca5e996df393954b7123 Mon Sep 17 00:00:00 2001 From: b3yond Date: Thu, 18 Jan 2018 13:42:23 +0100 Subject: [PATCH] only send one status at a time --- mailbot.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mailbot.py b/mailbot.py index 098fc24..20216d1 100644 --- a/mailbot.py +++ b/mailbot.py @@ -117,15 +117,14 @@ class Mailbot(object): with open(self.history_path, "w") as f: f.write(str(self.last_mail)) - def post(self, statuses): + def post(self, status): """ sends reports by other sources to a mailing list. - :param statuses: (list of report.Report objects) + :param status: (report.Report object) """ - for status in statuses: - mailer = sendmail.Mailer(self.config) - mailer.send(status.format(), self.mailinglist, "Warnung: Kontrolleure gesehen") + mailer = sendmail.Mailer(self.config) + mailer.send(status.format(), self.mailinglist, "Warnung: Kontrolleure gesehen") def make_report(self, msg): """