Changeset - 3bf8898ce66d
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 15 years ago 2011-02-11 11:32:10
marcin@python-works.com
removed immutable default argument from mailer
1 file changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/smtp_mailer.py
Show inline comments
 
@@ -47,7 +47,7 @@ class SmtpMailer(object):
 
        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 @@ class SmtpMailer(object):
 
                            '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:
0 comments (0 inline, 0 general)