]> code.ossystems Code Review - openembedded-core.git/commit
recipetool: create: fix falling back to declared license for npm packages
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 27 Apr 2016 13:06:19 +0000 (01:06 +1200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 6 May 2016 09:30:57 +0000 (10:30 +0100)
commit59381a9450949ce6b4b03adb717e950b999830f3
tree94a0b43ac8ac89a0e36e78ad535ef1701e798dc5
parent8c522f1f536270e195c8c73f5c72801495e7b33b
recipetool: create: fix falling back to declared license for npm packages

Fix two problems falling back to the "license" field from package.json
when no license file is present:
1) The function that was supposed to return the license field value was
   always explicitly returning None, and this was never noticed (because
   the test cases never exercised the fallback as they provided license
   files for each module).
2) Fix the main package not falling back because it had a default of an
   empty list, which evaluates to '' instead of 'Unknown'.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/recipetool/create.py
scripts/lib/recipetool/create_npm.py