fix: remove bare excepts

This commit is contained in:
Ankush Menat
2021-09-01 14:40:56 +05:30
parent 331ec13012
commit 76f1ed624a
24 changed files with 42 additions and 42 deletions

View File

@@ -95,7 +95,7 @@ class CourseSchedulingTool(Document):
if self.day == calendar.day_name[getdate(d.schedule_date).weekday()]:
frappe.delete_doc("Course Schedule", d.name)
rescheduled.append(d.name)
except:
except Exception:
reschedule_errors.append(d.name)
return rescheduled, reschedule_errors

View File

@@ -219,7 +219,7 @@ def get_quiz(quiz_name, course):
try:
quiz = frappe.get_doc("Quiz", quiz_name)
questions = quiz.get_questions()
except:
except Exception:
frappe.throw(_("Quiz {0} does not exist").format(quiz_name), frappe.DoesNotExistError)
return None