tools/pyboard: Provide more details when expected reply not received.

When trying to execute a command via raw REPL and expected "OK" reply
not received, show what was received instead.
This commit is contained in:
Paul Sokolovsky 2017-04-07 01:04:47 +03:00
parent 1da8404647
commit 3e1310d6e2
1 changed files with 1 additions and 1 deletions

View File

@ -319,7 +319,7 @@ class Pyboard:
# check if we could exec command
data = self.serial.read(2)
if data != b'OK':
raise PyboardError('could not exec command')
raise PyboardError('could not exec command (response: %s)' % data)
def exec_raw(self, command, timeout=10, data_consumer=None):
self.exec_raw_no_follow(command);