scripts/lib/bsp/help.py: Fixed pager for yocto-bsp help

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]

(From meta-yocto rev: 35b487a47f0cbb99fdee2ec9cc8b56b814c8860e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Humberto Ibarra
2016-07-02 13:17:56 -05:00
committed by Richard Purdie
parent 21282724d8
commit 71bc7fd8ce

View 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