Beispiel #1
0
    def slotComar(self, sock):
        try:
            reply = self.comar.com.read_cmd()
        except:
            if not self.wait_comar():
                logger.error("Can not connect to comar daemon")
            return

        if reply.command == "notify":
            (notification, script, data) = (reply.notify, reply.script, reply.data)
            data = unicode(data)

            if notification == "System.Upgrader.error":
                pass

            elif notification == "System.Upgrader.notify":
                pass

            elif notification == "System.Upgrader.progress":
                pass

            elif notification == "System.Upgrader.started":
                self.emit(SIGNAL("stepStarted(QString)", data))

            elif notification == "System.Upgrader.finished":
                self.emit(SIGNAL("stepFinished(QString)", data))

            else:
                print "Got notification : %s , for script : %s , with data : %s" % (notification, script, data)
Beispiel #2
0
def handleException(exception, value, tb):
    logger.error("".join(traceback.format_exception(exception, value, tb)))