]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
scripts/lib/bsp/help.py: Fixed pager for yocto-bsp help
authorHumberto Ibarra <humberto.ibarra.lopez@intel.com>
Sat, 2 Jul 2016 18:17:56 +0000 (13:17 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 7 Jul 2016 12:34:02 +0000 (13:34 +0100)
Python3 requires strings to be encoded as bytes before sending them through a subprocess pipe. The help.py file is not considering this and fails when issuing paged help commands. This patch adds this encoding to solve the problem.

[YOCTO #9868]

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/bsp/help.py

index 85a09dd29bb65252f363e4e1dda7e16025e4ee9b..311c5e418952cc6014c09dd8088141d8f4f3461f 100644 (file)
@@ -42,7 +42,7 @@ def display_help(subcommand, subcommands):
 
     help = subcommands.get(subcommand, subcommand_error)[2]
     pager = subprocess.Popen('less', stdin=subprocess.PIPE)
-    pager.communicate(help)
+    pager.communicate(bytes(help, 'UTF-8'))
 
     return True