Skip to content

Commit

Permalink
some code tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Jacob committed Feb 2, 2011
1 parent e46b649 commit 3876d30
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions pyramid_mailer/message.py
Expand Up @@ -16,8 +16,11 @@ class Attachment(object):
"""

def __init__(self, filename=None, content_type=None, data=None,
disposition=None):
def __init__(self,
filename=None,
content_type=None,
data=None,
disposition=None):

self.filename = filename
self.content_type = content_type
Expand Down Expand Up @@ -60,15 +63,8 @@ def __init__(self, subject,
self.cc = cc
self.bcc = bcc

if recipients is None:
recipients = []

self.recipients = list(recipients)

if attachments is None:
attachments = []

self.attachments = attachments
self.recipients = list(recipients or [])
self.attachments = attachments or []

@property
def send_to(self):
Expand Down Expand Up @@ -159,3 +155,4 @@ def attach(self,
self.attachments.append(
Attachment(filename, content_type, data, disposition))


0 comments on commit 3876d30

Please sign in to comment.