diff --git a/canopen/sdo/client.py b/canopen/sdo/client.py index 05a0276d..44159c49 100644 --- a/canopen/sdo/client.py +++ b/canopen/sdo/client.py @@ -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