mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-05 14:41:20 +00:00
Remove deprecated 'reset' key. Sad to see you go :(
This commit is contained in:
parent
688c615fd7
commit
cfa8fc5ab6
@ -21,7 +21,7 @@ class EventHandlerBase(ABC):
|
||||
def __init__(self, key):
|
||||
self.server_connector = ServerConnector()
|
||||
self.key = key
|
||||
self.subscribe(self.key, 'reset')
|
||||
self.subscribe(self.key)
|
||||
self.server_connector.register_callback(self.event_handler_callback)
|
||||
|
||||
def event_handler_callback(self, message):
|
||||
@ -57,9 +57,7 @@ class EventHandlerBase(ABC):
|
||||
:param message: the message received
|
||||
:returns: the message to send back
|
||||
"""
|
||||
if message['key'] != 'reset':
|
||||
return self.handle_event(message)
|
||||
return self.handle_reset(message)
|
||||
return self.handle_event(message)
|
||||
|
||||
@abstractmethod
|
||||
def handle_event(self, message):
|
||||
@ -71,16 +69,6 @@ class EventHandlerBase(ABC):
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def handle_reset(self, message):
|
||||
# pylint: disable=unused-argument,no-self-use
|
||||
"""
|
||||
Usually 'reset' events receive some sort of special treatment.
|
||||
|
||||
:param message: the message received
|
||||
:returns: the message to send back
|
||||
"""
|
||||
return None
|
||||
|
||||
def subscribe(self, *keys):
|
||||
"""
|
||||
Subscribe this EventHandler to receive events for given keys.
|
||||
|
Loading…
Reference in New Issue
Block a user