From f1a84a549225813d0731ed6a791cf2e907234e16 Mon Sep 17 00:00:00 2001 From: Maria Grimaldi Date: Tue, 10 Dec 2024 23:30:21 +0100 Subject: [PATCH] fix: remove unnecessary pylint suppression --- common/djangoapps/student/views/management.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/djangoapps/student/views/management.py b/common/djangoapps/student/views/management.py index 0f8be8ff9b56..02940da78f3b 100644 --- a/common/djangoapps/student/views/management.py +++ b/common/djangoapps/student/views/management.py @@ -423,8 +423,8 @@ def change_enrollment(request, check_access=True): enroll_mode = CourseMode.auto_enroll_mode(course_id, available_modes) if enroll_mode: CourseEnrollment.enroll(user, course_id, check_access=check_access, mode=enroll_mode) - except EnrollmentNotAllowed as exec: # pylint: disable=broad-except - return HttpResponseBadRequest(str(exec)) + except EnrollmentNotAllowed as exc: + return HttpResponseBadRequest(str(exc)) except Exception: # pylint: disable=broad-except return HttpResponseBadRequest(_("Could not enroll"))