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