Mercurial > kallithea
diff rhodecode/lib/smtp_mailer.py @ 1029:3bf8898ce66d beta
removed immutable default argument from mailer
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 11 Feb 2011 11:32:10 +0100 |
parents | ccd323bfa121 |
children | f6dca275c5a8 |
line wrap: on
line diff
--- a/rhodecode/lib/smtp_mailer.py Fri Feb 11 11:30:04 2011 +0100 +++ b/rhodecode/lib/smtp_mailer.py Fri Feb 11 11:32:10 2011 +0100 @@ -47,7 +47,7 @@ self.tls = tls self.debug = False - def send(self, recipients=[], subject='', body='', attachment_files={}): + def send(self, recipients=[], subject='', body='', attachment_files=None): if isinstance(recipients, basestring): recipients = [recipients] @@ -130,11 +130,11 @@ 'a dict in format {"filename":"filepath"}') def get_content(self, msg_file): - ''' - Get content based on type, if content is a string do open first + """Get content based on type, if content is a string do open first else just read because it's a probably open file object + :param msg_file: - ''' + """ if isinstance(msg_file, str): return open(msg_file, "rb").read() else: