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.
pull/2285/merge
Paul Sokolovsky 2017-04-07 01:04:47 +03:00
rodzic 1da8404647
commit 3e1310d6e2
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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);