vote pylint fixes

This commit is contained in:
lakshyacis 2019-09-30 18:42:50 +05:30
parent 9aa7dd9d78
commit e5b92e29a2
No known key found for this signature in database
GPG Key ID: D2C539C8EC63E9EB
1 changed files with 12 additions and 4 deletions

View File

@ -1,23 +1,31 @@
from debug import logger
from messagetypes import MsgBase
class Vote(MsgBase):
def __init__(self):
"""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):
super(Vote, self).encode()
"""Encode a vote"""
super(Vote, self).__init__()
try:["msgid"] = data["msgid"]["vote"] = data["vote"]
except KeyError as e:
logger.error("Missing key %s",
logger.error("Missing key %s", e)
def process(self):
"""Encode a vote"""
logger.debug("msgid: %s", self.msgid)
logger.debug("vote: %s",