mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-09 00:08:04 +08:00
16 lines
432 B
Python
16 lines
432 B
Python
|
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
|