Skip to content

Commit

Permalink
rpcclient: add descriptive error on peek failed
Browse files Browse the repository at this point in the history
  • Loading branch information
doronz88 committed Feb 19, 2022
1 parent cc2e92b commit 977cf80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rpcclient/rpcclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def peek(self, address: int, size: int) -> bytes:
self._sock.sendall(message)
reply = protocol_message_t.parse(self._recvall(reply_protocol_message_t.sizeof()))
if reply.cmd_type == cmd_type_t.CMD_REPLY_ERROR:
raise ArgumentError()
raise ArgumentError(f'failed to read {size} bytes from {address}')
return self._recvall(size)

def poke(self, address: int, data: bytes):
Expand Down

0 comments on commit 977cf80

Please sign in to comment.