##// END OF EJS Templates
removed immutable default argument from mailer
marcink -
r1029:3bf8898c beta
parent child Browse files
Show More
@@ -47,7 +47,7 b' class SmtpMailer(object):'
47 self.tls = tls
47 self.tls = tls
48 self.debug = False
48 self.debug = False
49
49
50 def send(self, recipients=[], subject='', body='', attachment_files={}):
50 def send(self, recipients=[], subject='', body='', attachment_files=None):
51
51
52 if isinstance(recipients, basestring):
52 if isinstance(recipients, basestring):
53 recipients = [recipients]
53 recipients = [recipients]
@@ -130,11 +130,11 b' class SmtpMailer(object):'
130 'a dict in format {"filename":"filepath"}')
130 'a dict in format {"filename":"filepath"}')
131
131
132 def get_content(self, msg_file):
132 def get_content(self, msg_file):
133 '''
133 """Get content based on type, if content is a string do open first
134 Get content based on type, if content is a string do open first
135 else just read because it's a probably open file object
134 else just read because it's a probably open file object
135
136 :param msg_file:
136 :param msg_file:
137 '''
137 """
138 if isinstance(msg_file, str):
138 if isinstance(msg_file, str):
139 return open(msg_file, "rb").read()
139 return open(msg_file, "rb").read()
140 else:
140 else:
General Comments 0
You need to be logged in to leave comments. Login now