Beispiel #1
0
 def run_end_of_semester(self, event=None):
     verification_code = self.verification_entry.get()
     if verification_code.lower() != "mis exec":
         self.feedback_label.config(style="ErrorLabel.TLabel")
         self.feedback_label['text'] = 'Please remember to enter the verification code.\n' \
                                       'This is to prevent accidental end of semester updates.\n' \
                                       'The verification code is <<mis exec>> without the << >>.'
     else:
         try:
             MIS_Database_Functions.run_end_of_semester()
             self.feedback_label.config(style="SuccessLabel.TLabel")
             self.feedback_label['text'] = 'End of Semester Transaction was run.\n' \
                                           'Please see the logs for more detailed information.'
         except sqlite3.DatabaseError:
             self.feedback_label.config(style="ErrorLabel.TLabel")
             self.feedback_label['text'] = 'There has been an issue with the database.\n' \
                                           'Please try again or consult the technical director.'
         except IOError:
             self.feedback_label.config(style="ErrorLabel.TLabel")
             self.feedback_label['text'] = 'There has been an IO error.\n' \
                                           'Please try again or consult the technical director.'