From 6880fa146b2fdc612fb530dc4a9c72dfd4acfa46 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Thu, 1 Jun 2017 11:43:28 -0400 Subject: [PATCH] More specific grace_course logging --- lms/djangoapps/instructor_task/tasks_helper/grades.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/instructor_task/tasks_helper/grades.py b/lms/djangoapps/instructor_task/tasks_helper/grades.py index b2cdcc6961..c345ea3f47 100644 --- a/lms/djangoapps/instructor_task/tasks_helper/grades.py +++ b/lms/djangoapps/instructor_task/tasks_helper/grades.py @@ -191,7 +191,11 @@ class CourseGradeReport(object): batched_rows = self._batched_rows(context) context.update_status(u'Compiling grades') - success_rows, error_rows = self._compile(context, batched_rows) + try: + success_rows, error_rows = self._compile(context, batched_rows) + except Exception: # pylint:disable=broad-except + TASK_LOG.exception('Something failed in compilation') + return context.update_status('Failed grades') context.update_status(u'Uploading grades') self._upload(context, success_headers, success_rows, error_headers, error_rows)