def event_text(self, event):
        """Returns a textual explanation of a given event object

        :param event: an PSrvEvent struct object
        :returns: the error string
        """
        logger.debug(hex(event.EvtCode) % "error text for %s")
        len_ = 1024
        text_type = ctypes.c_char * len_
        text = text_type()
        error = self.library.Srv_EventText(ctypes.byref(event),
                                           ctypes.byref(text), len_)
        check_error(error)
        if six.PY2:
            return text.value
        else:
            return text.value.decode('ascii')
dataset/ETHPy150Open gijzelaerr/python-snap7/snap7/server.py/Server.event_text/swapped operands of `%`