only send one status at a time

remotes/1705286528371406548/stable1
b3yond 2018-01-18 13:42:23 +01:00
parent b5288f341c
commit 048bad181b
1 changed files with 4 additions and 5 deletions

View File

@ -117,15 +117,14 @@ class Mailbot(object):
with open(self.history_path, "w") as f: with open(self.history_path, "w") as f:
f.write(str(self.last_mail)) f.write(str(self.last_mail))
def post(self, statuses): def post(self, status):
""" """
sends reports by other sources to a mailing list. 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 = sendmail.Mailer(self.config) mailer.send(status.format(), self.mailinglist, "Warnung: Kontrolleure gesehen")
mailer.send(status.format(), self.mailinglist, "Warnung: Kontrolleure gesehen")
def make_report(self, msg): def make_report(self, msg):
""" """