Skip to content

Commit dd4a464

Browse files
committed
change append to extend to fix bytestream error
1 parent 90d7b05 commit dd4a464

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

AWSIoTPythonSDK/core/greengrass/discovery/providers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def discover(self, thingName):
203203
"""
204204
205205
**Description**
206-
206+
207207
Perform the discovery request for the given Greengrass aware device thing name.
208208
209209
**Syntax**
@@ -246,9 +246,9 @@ def _create_tcp_connection(self):
246246

247247
def _create_ssl_connection(self, sock):
248248
self._logger.debug("Creating ssl connection...")
249-
249+
250250
ssl_protocol_version = ssl.PROTOCOL_SSLv23
251-
251+
252252
if self._port == 443:
253253
ssl_context = SSLContextBuilder()\
254254
.with_ca_certs(self._ca_path)\
@@ -368,7 +368,7 @@ def _receive_until(self, ssl_sock, criteria_function, extra_data=None):
368368
number_bytes_read = 0
369369
while True: # Python does not have do-while
370370
try:
371-
response.append(self._convert_to_int_py3(ssl_sock.read(1)))
371+
response.extend(self._convert_to_int_py3(ssl_sock.read(1)))
372372
number_bytes_read += 1
373373
except socket.error as err:
374374
if err.errno == ssl.SSL_ERROR_WANT_READ or err.errno == ssl.SSL_ERROR_WANT_WRITE:

0 commit comments

Comments
 (0)