def __run_dialog(self, args, *kwargs): if self.__tray != None and self.__main_gui == None: time.sleep(0.5) try: self.__main_gui = ui.mainGui(args) except Exception as e: dialogs.warningMsgBox({'title' : _("Running dnfdragora failure"), "text": str(e), "richtext":True}) yui.YDialog.deleteAllDialogs() time.sleep(0.5) self.__main_gui = None return self.__tray.icon = None self.__main_gui.handleevent() while self.__main_gui.loop_has_finished != True: time.sleep(1) yui.YDialog.deleteAllDialogs() time.sleep(1) self.__main_gui = None self.__get_updates()
def __run_dialog(self, args, *kwargs): if self.__tray != None and self.__main_gui == None and self.__tray.visible: if self.__hide_menu: self.__tray.visible = False time.sleep(0.5) try: self.__main_gui = ui.mainGui(args) except Exception as e: logger.error( "Exception on running dnfdragora with args %s - %s", str(args), str(e)) dialogs.warningMsgBox({ 'title': _("Running dnfdragora failure"), "text": str(e), "richtext": True }) yui.YDialog.deleteAllDialogs() time.sleep(0.5) self.__main_gui = None return #self.__tray.icon = None self.__main_gui.handleevent() logger.debug("Closing dnfdragora") while self.__main_gui.loop_has_finished != True: time.sleep(1) logger.info("Closed dnfdragora") yui.YDialog.deleteAllDialogs() time.sleep(1) self.__main_gui = None logger.debug("Look for remaining updates") # Let's delay a bit the check, otherwise Lock will fail done = self.__reschedule_update_in(0.5) logger.debug("Scheduled %s", "done" if done else "skipped") else: if self.__main_gui: logger.warning( "Cannot run dnfdragora because it is already running") else: logger.warning("Cannot run dnfdragora")
def __run_dialog(self, args, *kwargs): if self.__tray != None: self.__main_gui = ui.mainGui(args) self.__main_gui.handleevent()