From 505e039653e911bd2bd6d3666c7b9eccee07eae8 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Thu, 19 Oct 2017 10:13:14 -0400 Subject: [PATCH] Don't swallow exceptions by returning inside finally --- openedx/core/djangoapps/schedules/tasks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openedx/core/djangoapps/schedules/tasks.py b/openedx/core/djangoapps/schedules/tasks.py index 62259a053c..0f9243be86 100644 --- a/openedx/core/djangoapps/schedules/tasks.py +++ b/openedx/core/djangoapps/schedules/tasks.py @@ -142,8 +142,9 @@ class ScheduleMessageBaseTask(Task): except SiteConfiguration.DoesNotExist: org_list = None exclude_orgs = False - finally: - return exclude_orgs, org_list + + return exclude_orgs, org_list + class ScheduleRecurringNudge(ScheduleMessageBaseTask): num_bins = resolvers.RECURRING_NUDGE_NUM_BINS