Permalink
Browse files

some code tidying

  • Loading branch information...
1 parent e46b649 commit 3876d30311e13ad15983c6e7e88cc9b982eacac0 @danjac danjac committed Feb 2, 2011
Showing with 8 additions and 11 deletions.
  1. +8 −11 pyramid_mailer/message.py
View
@@ -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
@@ -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):
@@ -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.