[2/2] moveconfig: convert ps.stderr to string
diff mbox series

Message ID 20200212194645.1765445-3-mk@mkio.de
State Accepted
Delegated to: Tom Rini
Headers show
Series
  • moveconfig fixes
Related show

Commit Message

Markus Klotzbuecher Feb. 12, 2020, 7:46 p.m. UTC
Printing the error message in verbose mode fails, since python3
doesn't implicitely convert bytes to strings.

Signed-off-by: Markus Klotzbuecher <mk@mkio.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
---
 tools/moveconfig.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass Feb. 16, 2020, 7:02 p.m. UTC | #1
On Wed, 12 Feb 2020 at 12:47, Markus Klotzbuecher <mk@mkio.de> wrote:
>
> Printing the error message in verbose mode fails, since python3
> doesn't implicitely convert bytes to strings.
>
> Signed-off-by: Markus Klotzbuecher <mk@mkio.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>  tools/moveconfig.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini Feb. 25, 2020, 7 p.m. UTC | #2
On Wed, Feb 12, 2020 at 08:46:45PM +0100, Markus Klotzbuecher wrote:

> Printing the error message in verbose mode fails, since python3
> doesn't implicitely convert bytes to strings.
> 
> Signed-off-by: Markus Klotzbuecher <mk@mkio.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

Patch
diff mbox series

diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index df20ec66af..d8bf7fd071 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -1217,7 +1217,7 @@  class Slot:
                                "Failed to process.\n")
         if self.options.verbose:
             self.log += color_text(self.options.color, COLOR_LIGHT_CYAN,
-                                   self.ps.stderr.read())
+                                   self.ps.stderr.read().decode())
         self.finish(False)
 
     def do_defconfig(self):