From 78d70f2f8b7460d701474864fba6dd962e5f3c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Sun, 12 May 2019 22:28:31 +0200 Subject: [PATCH] Make PipeIOEventHandlerBase handle all input errors (while screaming) --- lib/tfw/components/pipe_io_event_handler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/tfw/components/pipe_io_event_handler.py b/lib/tfw/components/pipe_io_event_handler.py index 63855b6..d60fedf 100644 --- a/lib/tfw/components/pipe_io_event_handler.py +++ b/lib/tfw/components/pipe_io_event_handler.py @@ -41,7 +41,10 @@ class CallbackPipeIOServer(PipeIOServer): self.callback = callback def handle_message(self, message): - self.callback(message) + try: + self.callback(message) + except: # pylint: disable=bare-except + LOG.exception('Failed to handle message %s from pipe %s!', message, self.in_pipe) class PipeIOEventHandler(PipeIOEventHandlerBase):