From 79b18d07c96fe2c640dfefb183c4f0528ad8966a Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Mon, 2 Nov 2020 09:13:15 -0500 Subject: [PATCH] cli: fix bug in probe --- lib/solaar/cli/probe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/solaar/cli/probe.py b/lib/solaar/cli/probe.py index 4e77fd8e..6092ec4e 100644 --- a/lib/solaar/cli/probe.py +++ b/lib/solaar/cli/probe.py @@ -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