From d5eb9c0b210f865f242b63f66ea727a6fc132bcd Mon Sep 17 00:00:00 2001 From: bmedx Date: Fri, 3 Mar 2017 10:32:22 -0500 Subject: [PATCH] Fix more lint violations, remove prints --- cms/djangoapps/cms_user_tasks/signals.py | 2 +- cms/djangoapps/cms_user_tasks/tests.py | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/cms/djangoapps/cms_user_tasks/signals.py b/cms/djangoapps/cms_user_tasks/signals.py index 00d2ccda72..7fc8c6f629 100644 --- a/cms/djangoapps/cms_user_tasks/signals.py +++ b/cms/djangoapps/cms_user_tasks/signals.py @@ -46,5 +46,5 @@ def user_task_stopped_handler(sender, **kwargs): # pylint: disable=unused-argum try: # Need to str state_text here because it is a proxy object and won't serialize correctly send_task_complete_email.delay(status.name.lower(), str(status.state_text), status.user.email, detail_url) - except Exception as e: # pylint: disable=broad-except + except Exception: # pylint: disable=broad-except logging.exception("Unable to queue send_task_complete_email") diff --git a/cms/djangoapps/cms_user_tasks/tests.py b/cms/djangoapps/cms_user_tasks/tests.py index 5319d5af22..3d5c9888bb 100644 --- a/cms/djangoapps/cms_user_tasks/tests.py +++ b/cms/djangoapps/cms_user_tasks/tests.py @@ -149,10 +149,6 @@ class TestUserTaskStopped(APITestCase): reverse('usertaskstatus-detail', args=[self.status.uuid]) ] - for m in mail.outbox: - print (m.subject) - print (m.body) - self.assertEqual(len(mail.outbox), 1) msg = mail.outbox[0] @@ -185,10 +181,6 @@ class TestUserTaskStopped(APITestCase): "Sign in to view the details of your task or download any files created." ] - for m in mail.outbox: - print (m.subject) - print (m.body) - self.assertEqual(len(mail.outbox), 1) msg = mail.outbox[0]