[PATCH] tools: satisfy Python 2/3 compatibility

2 views
Skip to first unread message

Ralf Ramsauer

unread,
Jan 10, 2017, 6:35:49 PM1/10/17
to jailho...@googlegroups.com, Ralf Ramsauer
'jailhouse-cell-linux --write-params' will output sth. like
"b'kernel=0xe8002000 dtb=0xe8000000'" without the .decode() on ARM. This
additional .decode() won't hurt Python 2 and removes the surrounding b''
when running the tool under Python 3.

Signed-off-by: Ralf Ramsauer <ralf.r...@oth-regensburg.de>
---
tools/jailhouse-cell-linux | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/jailhouse-cell-linux b/tools/jailhouse-cell-linux
index 790f474a73..1643a7312d 100755
--- a/tools/jailhouse-cell-linux
+++ b/tools/jailhouse-cell-linux
@@ -385,7 +385,7 @@ Modified device tree written. Start Linux with the following commands \
\n\
jailhouse cell create %s\n\
jailhouse cell load %s linux-loader.bin -s "%s" -a 0x%x %s -a 0x%x ' %
- (args.config.name, config.name, self.params,
+ (args.config.name, config.name, self.params.decode(),
self.params_address(), args.kernel.name, self._kernel_addr),
end='')
if args.initrd:
--
2.11.0

Jan Kiszka

unread,
Jan 11, 2017, 5:02:53 AM1/11/17
to Ralf Ramsauer, jailho...@googlegroups.com
Thanks, applied.

Jan

--
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux
Reply all
Reply to author
Forward
0 new messages