From 5150a960055c31623dacf252a8db13532ee7a20c Mon Sep 17 00:00:00 2001 From: Jose Antonio Gonzalez Date: Fri, 24 Nov 2017 14:59:41 +0200 Subject: [PATCH] fix pep8 --- lms/djangoapps/student_account/views.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lms/djangoapps/student_account/views.py b/lms/djangoapps/student_account/views.py index 23efbed7b4..70c9c8c08e 100644 --- a/lms/djangoapps/student_account/views.py +++ b/lms/djangoapps/student_account/views.py @@ -212,15 +212,13 @@ def password_change_request_handler(request): email =\ user.email if user.is_authenticated() else request.POST.get('email') + error_message =\ + _("Some error occured during password change. Please try again") + if email: status_response = change_password(request, email) if status_response == 500: - return\ - HttpResponse( - _("Some error occured during password change. Please try " - "again"), - status=status_response - ) + return HttpResponse(error_message, status=status_response) elif status_response == 403: return HttpResponseForbidden() @@ -615,8 +613,6 @@ class RecoverPasswordView(views.APIView): HttpResponse: 405 if using an unsupported HTTP method """ - http_method_names = ["post"] - def post(self, request, format=None): """ Makes the request to change the password