tools/pyboard: Use repr() when quoting data in error messages.

As it may contain newlines, etc.
This commit is contained in:
Paul Sokolovsky 2017-10-05 23:40:19 +03:00
parent 98dd126e98
commit ea6692a83e
1 changed files with 1 additions and 1 deletions

View File

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