You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bazarr/libs/signalrcore/messages/base_message.py

16 lines
432 B

from .message_type import MessageType
class BaseMessage(object):
def __init__(self, message_type, **kwargs):
self.type = MessageType(message_type)
class BaseHeadersMessage(BaseMessage):
"""
All messages expct ping can carry aditional headers
"""
def __init__(self, message_type, headers={}, **kwargs):
super(BaseHeadersMessage, self).__init__(message_type)
self.headers = headers