mailer: don't use a mutable default argument

This commit is contained in:
Marcin Kuzminski 2017-02-07 16:07:05 +01:00
parent 029abc25e9
commit 18f667c234

View file

@ -71,9 +71,9 @@ class SmtpMailer(object):
smtplib.stderr = StderrLogger()
return smtplib
def send(self, recipients=[], subject='', body='', html='',
def send(self, recipients=None, subject='', body='', html='',
attachment_files=None):
recipients = recipients or []
if isinstance(recipients, basestring):
recipients = [recipients]
headers = {