Skip to content

Commit 72d3641

Browse files
committed
fix bug
1 parent 5ac3a41 commit 72d3641

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pymycobot/common.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,14 @@ def write(self, command, method=None):
465465
command = "'" + command[4] + "'" + "(" + command[5] + ")"
466466
command = command.encode()
467467
if method == "socket":
468-
self.log.debug("_write: {}".format([hex(i) for i in command]))
468+
log_command = []
469+
for i in command:
470+
if isinstance(i, str):
471+
log_command.append(i)
472+
else:
473+
log_command.append(hex(i))
474+
self.log.debug("_write: {}".format(log_command))
475+
469476
py_version = check_python_version()
470477
if py_version == 2:
471478
self.sock.sendall("".join([chr(b) for b in command]))

0 commit comments

Comments
 (0)