PEP8 cleanups, E501.

This commit is contained in:
Roberto Rosario
2015-07-23 04:05:29 -04:00
parent 0a0a92116e
commit 3b728328ad
48 changed files with 613 additions and 176 deletions

View File

@@ -6,11 +6,15 @@ from mayan.celery import app
@app.task(ignore_result=True)
def task_send_document(subject_text, body_text_content, sender, recipient, document_id, as_attachment=False):
email_msg = EmailMultiAlternatives(subject_text, body_text_content, sender, [recipient])
email_msg = EmailMultiAlternatives(
subject_text, body_text_content, sender, [recipient]
)
if as_attachment:
document = Document.objects.get(pk=document_id)
with document.open() as descriptor:
email_msg.attach(document.label, descriptor.read(), document.file_mimetype)
email_msg.attach(
document.label, descriptor.read(), document.file_mimetype
)
email_msg.send()