Skip to content

Commit ea82a78

Browse files
author
Dmitri Zimine
committed
Remove unicode_string from log to prevent error.
1 parent 65c3baf commit ea82a78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymodbus/payload.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def _unpack_words(self, fstring, handle):
331331
:return:
332332
"""
333333
handle = make_byte_string(handle)
334-
wc = WC.get(fstring.lower())//2
334+
wc = WC.get(fstring.lower()) // 2
335335
up = "!{}H".format(wc)
336336
handle = unpack(up, handle)
337337
if self._wordorder == Endian.Little:
@@ -340,8 +340,8 @@ def _unpack_words(self, fstring, handle):
340340
# Repack as unsigned Integer
341341
pk = self._byteorder + 'H'
342342
handle = [pack(pk, p) for p in handle]
343+
_logger.debug(handle)
343344
handle = b''.join(handle)
344-
_logger.debug(unicode_string(handle))
345345
return handle
346346

347347
def reset(self):

0 commit comments

Comments
 (0)