This repository has been archived on 2024-12-03. You can view files and clone it, but cannot push or open issues or pull requests.
PyBitmessage-2024-12-03/src/messagetypes/vote.py
Peter Surda 2cc4435cfc
Imports, typos, syntax errors
- remove obsolete imports
- add missing imports
- fix typos
- fix syntax errors
- thanks to landscape.io for report
2017-02-08 14:19:02 +01:00

24 lines
605 B
Python

from debug import logger
from messagetypes import MsgBase
class Vote(MsgBase):
def __init__(self):
return
def decode(self, data):
self.msgid = data["msgid"]
self.vote = data["vote"]
def encode(self, data):
super(Vote, self).encode()
try:
self.data["msgid"] = data["msgid"]
self.data["vote"] = data["vote"]
except KeyError as e:
logger.error("Missing key %s", e.name)
return self.data
def process(self):
logger.debug("msgid: %s", self.msgid)
logger.debug("vote: %s", self.vote)