scripts: runner: add __str__ for RunnerCaps

It will be useful to be able to print a human-readable representation
later.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
This commit is contained in:
Marti Bolivar 2018-03-27 22:15:07 -04:00 committed by Anas Nashif
parent f4b6daff4b
commit 2715a011ee

View file

@ -182,6 +182,10 @@ class RunnerCaps:
self.commands = commands self.commands = commands
self.flash_addr = bool(flash_addr) self.flash_addr = bool(flash_addr)
def __str__(self):
return 'RunnerCaps(commands={}, flash_addr={})'.format(
self.commands, self.flash_addr)
_YN_CHOICES = ['Y', 'y', 'N', 'n', 'yes', 'no', 'YES', 'NO'] _YN_CHOICES = ['Y', 'y', 'N', 'n', 'yes', 'no', 'YES', 'NO']