Skip to content

Commit

Permalink
fix: remove useless supression warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
AfaqShuaib09 committed Nov 22, 2023
1 parent 0c89201 commit e73cabb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,14 @@ def ingest(self): # pylint: disable=too-many-statements
course_run, is_course_run_created = self._get_or_create_course_run(
row, course, course_type, course_run_type.uuid
)
except Exception as exc: # pylint: disable=broad-except
except Exception as exc:
logger.exception(exc)
continue
else:
logger.info("Course key {} could not be found in database, creating the course.".format(course_key)) # lint-amnesty, pylint: disable=logging-format-interpolation
try:
_ = self._create_course(row, course_type, course_run_type.uuid)
except Exception as exc: # pylint: disable=broad-except
except Exception as exc:
exception_message = exc
if hasattr(exc, 'response'):
exception_message = exc.response.content.decode('utf-8')
Expand Down Expand Up @@ -476,7 +476,7 @@ def get_draft_flag(self, course):
No 1 is not applicable at the moment as we are changing status via CSV loader, so we are sending false
draft flag to the course_run api directly for now.
"""
return not (CourseRun.objects.filter_drafts(course=course, status=CourseRunStatus.Published).exists())
return not CourseRun.objects.filter_drafts(course=course, status=CourseRunStatus.Published).exists()

def _archive_stale_products(self, course_external_identifiers):
"""
Expand Down

0 comments on commit e73cabb

Please sign in to comment.