From dd4a46459b754415ea688f8baa04c5ff2800f932 Mon Sep 17 00:00:00 2001 From: Joseph Klix Date: Thu, 17 Feb 2022 11:53:53 -0800 Subject: [PATCH] change append to extend to fix bytestream error --- AWSIoTPythonSDK/core/greengrass/discovery/providers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AWSIoTPythonSDK/core/greengrass/discovery/providers.py b/AWSIoTPythonSDK/core/greengrass/discovery/providers.py index 646d79d..47235c9 100644 --- a/AWSIoTPythonSDK/core/greengrass/discovery/providers.py +++ b/AWSIoTPythonSDK/core/greengrass/discovery/providers.py @@ -203,7 +203,7 @@ def discover(self, thingName): """ **Description** - + Perform the discovery request for the given Greengrass aware device thing name. **Syntax** @@ -246,9 +246,9 @@ def _create_tcp_connection(self): def _create_ssl_connection(self, sock): self._logger.debug("Creating ssl connection...") - + ssl_protocol_version = ssl.PROTOCOL_SSLv23 - + if self._port == 443: ssl_context = SSLContextBuilder()\ .with_ca_certs(self._ca_path)\ @@ -368,7 +368,7 @@ def _receive_until(self, ssl_sock, criteria_function, extra_data=None): number_bytes_read = 0 while True: # Python does not have do-while try: - response.append(self._convert_to_int_py3(ssl_sock.read(1))) + response.extend(self._convert_to_int_py3(ssl_sock.read(1))) number_bytes_read += 1 except socket.error as err: if err.errno == ssl.SSL_ERROR_WANT_READ or err.errno == ssl.SSL_ERROR_WANT_WRITE: