BF: Incorrect number of arguments in smtp.py action connect log

pull/549/head
Steven Hiscocks 2014-01-01 23:50:44 +00:00
parent 776b65f73e
commit 98bf511443
1 changed files with 3 additions and 2 deletions

View File

@ -87,7 +87,7 @@ class SMTPAction(ActionBase):
smtp = smtplib.SMTP() smtp = smtplib.SMTP()
try: try:
self.logSys.debug("Connected to SMTP '%s', response: %i: %s", self.logSys.debug("Connected to SMTP '%s', response: %i: %s",
*smtp.connect(self.host)) self.host, *smtp.connect(self.host))
if self.user and self.password: if self.user and self.password:
smtp.login(self.user, self.password) smtp.login(self.user, self.password)
failed_recipients = smtp.sendmail( failed_recipients = smtp.sendmail(
@ -113,7 +113,8 @@ class SMTPAction(ActionBase):
self.logSys.debug("Email '%s' successfully sent", subject) self.logSys.debug("Email '%s' successfully sent", subject)
finally: finally:
try: try:
smtp.quit() self.logSys.debug("Disconnected from '%s', response %i: %s",
self.host, *smtp.quit())
except smtplib.SMTPServerDisconnected: except smtplib.SMTPServerDisconnected:
pass # Not connected pass # Not connected