From 2598e2fb30153f6cc3bd6b190569998e31e3a39b Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 18 Jan 2020 18:26:23 +0100 Subject: [PATCH] Replace the \r\n sequence with \n in the processed response --- platypush/plugins/esp/models/connection.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platypush/plugins/esp/models/connection.py b/platypush/plugins/esp/models/connection.py index dd822f88..f7b85274 100644 --- a/platypush/plugins/esp/models/connection.py +++ b/platypush/plugins/esp/models/connection.py @@ -158,6 +158,10 @@ class Connection: self._received_response = self._received_response[4:] self._received_response = self._received_response.strip() + # Replace \r\n serial end-of-line with \n + self._received_response = self._received_response.replace('\r\n', '\n') + + # Notify the listeners self._response_received.set() def wait_ready(self):