From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Sohaib Mohamed <sohaib.amhmd@gmail.com>,
Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/2] bbremote: decode bytes output of getenv and md on command line
Date: Thu, 12 Dec 2024 08:19:28 +0100 [thread overview]
Message-ID: <20241212071928.2466094-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20241212071928.2466094-1-a.fatoum@pengutronix.de>
That way the output of
scripts/bbremote --port /dev/ttyUSB10 md /dev/zero 0 4
is 00000000 instead of b'00000000'.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
scripts/remote/main.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/remote/main.py b/scripts/remote/main.py
index 020a78c3fcb0..4bc855616ae3 100644
--- a/scripts/remote/main.py
+++ b/scripts/remote/main.py
@@ -71,7 +71,7 @@ def handle_getenv(args):
if not value:
res = 1
else:
- print(value)
+ print(value.decode())
res = 0
ctrl.close()
return res
@@ -81,7 +81,7 @@ def handle_md(args):
ctrl = get_controller(args)
(res,data) = ctrl.md(args.path, args.address, args.size)
if res == 0:
- print(binascii.hexlify(data))
+ print(binascii.hexlify(data).decode())
ctrl.close()
return res
--
2.39.5
next prev parent reply other threads:[~2024-12-12 7:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 7:19 [PATCH 1/2] bbremote: fix 'NoneType' object has no attribute 'encode' Ahmad Fatoum
2024-12-12 7:19 ` Ahmad Fatoum [this message]
2024-12-12 8:20 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241212071928.2466094-2-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=sohaib.amhmd@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox