def list_donors(): err_msg = "Error while listing donors\n%s" try: sort_by_order.sorting_donor_by_order() except FileNotFoundError as lister_error: system("cls") print(err_msg % "File cannot be found\n%s" % str(lister_error)) except ValueError as lister_error: system("cls") print(err_msg % "ValueError\n%" % str(lister_error)) except IndexError as lister_error: system("cls") print(err_msg % "IndexError" % str(lister_error)) finally: sleep(1.5)
def list_donors(): try: sort_by_order.sorting_donor_by_order(cursor_obj=cursor_obj) except sql.Error as err: print(err) sleep(3)