mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 07:31:31 +00:00
Remove potentially harmful 'error handling'
This commit is contained in:
parent
9e36bde974
commit
1bfaac0493
@ -39,15 +39,9 @@ class CallbackPipeIOServer(PipeIOServer):
|
||||
|
||||
class PipeIOEventHandler(PipeIOEventHandlerBase):
|
||||
def handle_event(self, message):
|
||||
try:
|
||||
json_bytes = dumps(message).encode()
|
||||
self.pipe_io.send_message(json_bytes)
|
||||
except TypeError:
|
||||
LOG.error("Message %s not JSON serializable! Ignoring...", message)
|
||||
json_bytes = dumps(message).encode()
|
||||
self.pipe_io.send_message(json_bytes)
|
||||
|
||||
def handle_pipe_event(self, message):
|
||||
try:
|
||||
json = loads(message)
|
||||
self.server_connector.send(json)
|
||||
except JSONDecodeError:
|
||||
LOG.error("Invalid JSON received on %s! Ignoring...", self.pipe_io.in_pipe)
|
||||
json = loads(message)
|
||||
self.server_connector.send(json)
|
||||
|
Loading…
Reference in New Issue
Block a user