Skip to content

Commit 4b76c39

Browse files
Merge pull request #160 from Qbicz/sdo_exception_fix
Fix SDO communication error printout
2 parents 264ff4f + 61f4198 commit 4b76c39

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

canopen/sdo/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ def write(self, b):
406406
res_command, = struct.unpack("B", response[0:1])
407407
if res_command & 0xE0 != RESPONSE_SEGMENT_DOWNLOAD:
408408
raise SdoCommunicationError(
409-
"Unexpected response 0x%02X (expected 0x%02X)" % res_command)
409+
"Unexpected response 0x%02X (expected 0x%02X)" %
410+
(res_command, RESPONSE_SEGMENT_DOWNLOAD))
410411
# Advance position
411412
self.pos += bytes_sent
412413
return bytes_sent

0 commit comments

Comments
 (0)