cli: fix bug in probe

This commit is contained in:
Peter F. Patel-Schneider 2020-11-02 09:13:15 -05:00
parent d92939135f
commit 79b18d07c9
1 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@ def run(receivers, args, find_receiver, _ignore):
if not isinstance(last, bytes) or not isinstance(rgst, bytes) or last != rgst:
print(
' Register Short %#04x %#04x: %s' %
(reg, sub, str(rgst) if isinstance(rgst, int) else '0x' + _strhex(rgst))
(reg, sub, '0x' + _strhex(rgst) if isinstance(rgst, bytes) else str(rgst))
)
last = rgst
last = None
@ -108,6 +108,6 @@ def run(receivers, args, find_receiver, _ignore):
if not isinstance(last, bytes) or not isinstance(rgst, bytes) or last != rgst:
print(
' Register Long %#04x %#04x: %s' %
(reg, sub, str(rgst) if isinstance(rgst, int) else '0x' + _strhex(rgst))
(reg, sub, '0x' + _strhex(rgst) if isinstance(rgst, bytes) else str(rgst))
)
last = rgst