From 85ca6ad5ec7f39dffa0454dcde3e4ed914d21729 Mon Sep 17 00:00:00 2001 From: Andy Shultz Date: Mon, 5 Dec 2022 10:41:17 -0500 Subject: [PATCH] fix: catch even base exceptions when exiting prior exception catch is not triggering in cases where the job blows up, there is one more level of exception available to catch and print --- .../course_goals/management/commands/goal_reminder_email.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/djangoapps/course_goals/management/commands/goal_reminder_email.py b/lms/djangoapps/course_goals/management/commands/goal_reminder_email.py index 8ed453d06b..2c802f8a0d 100644 --- a/lms/djangoapps/course_goals/management/commands/goal_reminder_email.py +++ b/lms/djangoapps/course_goals/management/commands/goal_reminder_email.py @@ -120,7 +120,7 @@ class Command(BaseCommand): try: self._handle_all_goals() - except Exception: # pylint: disable=broad-except + except BaseException: # pylint: disable=broad-except log.exception("Error while sending course goals emails: ") raise