only send one status at a time

This commit is contained in:
b3yond 2018-01-18 13:42:23 +01:00
parent b5288f341c
commit 048bad181b

View file

@ -117,13 +117,12 @@ 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")