Skip to content

Commit

Permalink
Merge pull request #4034 from CarlQLange/patch-4
Browse files Browse the repository at this point in the history
Don't set a default argument as a mutable type
  • Loading branch information
wardi committed Feb 22, 2018
2 parents 88b5aa3 + ef0598b commit 3251b50
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ckan/lib/mailer.py
Expand Up @@ -28,7 +28,11 @@ class MailerException(Exception):

def _mail_recipient(recipient_name, recipient_email,
sender_name, sender_url, subject,
body, headers={}):
body, headers=None):

if not headers:
headers = {}

mail_from = config.get('smtp.mail_from')
msg = MIMEText(body.encode('utf-8'), 'plain', 'utf-8')
for k, v in headers.items():
Expand Down

0 comments on commit 3251b50

Please sign in to comment.