You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
765 B

import logging
from messagetypes import MsgBase
logger = logging.getLogger('default')
class Vote(MsgBase):
"""Module used to vote"""
def decode(self, data):
"""decode a vote"""
# pylint: disable=attribute-defined-outside-init
self.msgid = data["msgid"] = data["vote"]
def encode(self, data):
"""Encode a vote"""
super(Vote, self).__init__()
try:["msgid"] = data["msgid"]["vote"] = data["vote"]
except KeyError as e:
logger.error("Missing key %s", e)
def process(self):
"""Encode a vote"""
logger.debug("msgid: %s", self.msgid)
logger.debug("vote: %s",