Should be byte string

This commit is contained in:
Steve Gilberd 2020-02-26 02:52:12 +13:00
parent 61f428fd40
commit d53a981dd1
No known key found for this signature in database
GPG Key ID: 3CA3675E3C90637F

View File

@ -636,7 +636,7 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
s = self._json_encode(self.opcodes[op], arg) s = self._json_encode(self.opcodes[op], arg)
if print_debug_info and extra_debug: if print_debug_info and extra_debug:
self._debug('send string', s) self._debug('send string', s)
self._send_byte_string(self.device_socket, (b'%d' % len(s)) + s) self._send_byte_string(self.device_socket, (b'%d' % len(s)) + s.encode())
if not wait_for_response: if not wait_for_response:
return None, None return None, None
return self._receive_from_client(print_debug_info=print_debug_info) return self._receive_from_client(print_debug_info=print_debug_info)