]> code.ossystems Code Review - openembedded-core.git/commit
npm.bbclass: avoid str/byte conversion problems for PKGV and SUMMARY
authorPatrick Ohly <patrick.ohly@intel.com>
Fri, 10 Jun 2016 08:04:51 +0000 (10:04 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 12 Jun 2016 22:42:41 +0000 (23:42 +0100)
commit241e094bcd9212204350f9855257474908f82a3c
treec9afbbbd05899ad90b422d350791ac61824da9ed
parent0632c3e69070e340218c1c1c835b2343cd143d8d
npm.bbclass: avoid str/byte conversion problems for PKGV and SUMMARY

In Python3, str.encode() returns byte strings, which later are not
converted back to strings automatically, leading to "TypeError: Can't
convert 'bytes' object to str implicitly" in code which reads PKGV and
SUMMARY and expects to find strings there.

The npm.bbclass must use values for d.setVar() that meet that
expectation, and thus the redundant (and in Python3, harmful)
.encode() gets removed.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/npm.bbclass