Skip to content

Commit

Permalink
Changed excessively large variable argument name.
Browse files Browse the repository at this point in the history
  • Loading branch information
amcgregor committed Aug 25, 2014
1 parent 37d205e commit dbebf24
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions marrow/mailer/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def mime(self):
return message

def attach(self, name, data=None, maintype=None, subtype=None,
inline=False, attachment_filename=None):
inline=False, filename=None):
"""Attach a file to this message.
:param name: Path to the file to attach if data is None, or the name
Expand All @@ -264,7 +264,7 @@ def attach(self, name, data=None, maintype=None, subtype=None,
automatically guessed if not given
:param inline: Whether to set the Content-Disposition for the file to
"inline" (True) or "attachment" (False)
:param attachment_filename: The file name of the attached file as seen
:param filename: The file name of the attached file as seen
by the user in his/her mail client.
"""
self._dirty = True
Expand Down Expand Up @@ -294,11 +294,11 @@ def attach(self, name, data=None, maintype=None, subtype=None,
part.add_header('Content-ID', '<%s>' % name)
self.embedded.append(part)
else:
if attachment_filename:
attachment_filename = os.path.basename(attachment_filename)
if filename:
filename = os.path.basename(filename)
else:
attachment_filename = name
part.add_header('Content-Disposition', 'attachment', filename=attachment_filename)
filename = name
part.add_header('Content-Disposition', 'attachment', filename=filename)
part.add_header('Content-Transfer-Encoding','base64')
self.attachments.append(part)

Expand Down

0 comments on commit dbebf24

Please sign in to comment.