]> code.ossystems Code Review - openembedded-core.git/commit
recipetool: create: avoid decoding errors with Python 3
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 29 Jun 2016 03:12:03 +0000 (15:12 +1200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 8 Jul 2016 08:55:40 +0000 (09:55 +0100)
commit50fcd9d1b9a20d49bc873467a82a071f2f2f8b5a
tree3ec5e17de68e4cc547669181c4c4d36a0b527e9a
parent2004307044e958cdf508b72f180e238a3e297179
recipetool: create: avoid decoding errors with Python 3

We're opening source files with the default encoding (utf-8) but we
can't necessarily be sure that they are UTF-8 clean - for example,
recipetool create ftp://mama.indstate.edu/linux/tree/tree-1.7.0.tgz
prior to this patch resulted in a UnicodeDecodeError. Use the
"surrogateescape" mode to avoid this.

Fixes [YOCTO #9822].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/recipetool/create.py
scripts/lib/recipetool/create_buildsys.py
scripts/lib/recipetool/create_kernel.py
scripts/lib/recipetool/create_kmod.py
scripts/lib/recipetool/create_npm.py