def onquit(self, ev): "Check if program is busy before quitting" if active_count() > 1: TkDialog(None, "Please wait until conversions are complete!", "Info").run() elif self.rec is None: self.quit = True