Ejemplo n.º 1
0
    def popup_error_box(self, msg):
        Logger.error(
            msg.replace("<b>", "").replace("</b>", "").replace("<br />", ":").replace("<br/>", ":"))

        msg_box = QMessageBox()
        msg_box.setWindowTitle("Error")
        msg_box.setIcon(QMessageBox.Critical)
        msg_box.setText(msg)
        msg_box.setStandardButtons(QMessageBox.Ok)
        reply = msg_box.exec_()  # Blocking
Ejemplo n.º 2
0
    def set_serializer_data(self, serializer_data):
        name = serializer_data.name
        Logger.info("Loading SerializerData of '%s' from Configuration" % name)

        if not isinstance(serializer_data, SerializerData):
            Logger.error("Type of SerializerData '%s' is not valid: %s" %
                         (name, type(serializer_data)))

        try:
            serializer_data.directory = self.__config["SerializerData"][name][
                "directory"]
            serializer_data.prefix = self.__config["SerializerData"][name][
                "prefix"]
        except IndexError as e:
            Logger.warning("Error loading SerializerData of '%s': %s" %
                           (name, e))
Ejemplo n.º 3
0
    def __init__(self, filename):
        filename = path.join(Pixmap.ImagePath, filename)
        if not path.isfile(filename):
            Logger.error("Path to pixmap does not exist: %s" % filename)

        super().__init__(filename)