Skip to content

Commit

Permalink
Merge pull request #160 from Qbicz/sdo_exception_fix
Browse files Browse the repository at this point in the history
Fix SDO communication error printout
  • Loading branch information
christiansandberg authored Aug 27, 2019
2 parents 264ff4f + 61f4198 commit 4b76c39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion canopen/sdo/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,8 @@ def write(self, b):
res_command, = struct.unpack("B", response[0:1])
if res_command & 0xE0 != RESPONSE_SEGMENT_DOWNLOAD:
raise SdoCommunicationError(
"Unexpected response 0x%02X (expected 0x%02X)" % res_command)
"Unexpected response 0x%02X (expected 0x%02X)" %
(res_command, RESPONSE_SEGMENT_DOWNLOAD))
# Advance position
self.pos += bytes_sent
return bytes_sent
Expand Down

0 comments on commit 4b76c39

Please sign in to comment.