diff options
author | Sarah Marsh <sarah.marsh.engineer@gmail.com> | 2018-04-25 20:35:25 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-15 17:56:57 +0100 |
commit | 00efe433ec025da81ee972e9d4e57302b82c8794 (patch) | |
tree | bb292f9b07061509182dad7705a36d23d5e60562 | |
parent | 13977b08a855e98fa4ddcf43783ebf003d8387b5 (diff) | |
download | poky-00efe433ec025da81ee972e9d4e57302b82c8794.tar.gz |
recipetool: fixed uncaught NameError exception
When packaging a node application, a `NameError` can be thrown in create_npm.py if an optional npm dependency does not
support Linux.
(From OE-Core rev: 8293201d98d368d6322eaa960fb3e7cee2ba9368)
(From OE-Core rev: c5d0afb8d7faa2c2662264e913dc2733503ec204)
Signed-off-by: Sarah Marsh <sarah.marsh@arm.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | scripts/lib/recipetool/create_npm.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/lib/recipetool/create_npm.py b/scripts/lib/recipetool/create_npm.py index fb57e705f2..bb42a5ca5c 100644 --- a/scripts/lib/recipetool/create_npm.py +++ b/scripts/lib/recipetool/create_npm.py | |||
@@ -320,6 +320,7 @@ class NpmRecipeHandler(RecipeHandler): | |||
320 | blacklist = True | 320 | blacklist = True |
321 | break | 321 | break |
322 | if (not blacklist and 'linux' not in pkg_os) or '!linux' in pkg_os: | 322 | if (not blacklist and 'linux' not in pkg_os) or '!linux' in pkg_os: |
323 | pkg = pdata.get('name', 'Unnamed package') | ||
323 | logger.debug(2, "Skipping %s since it's incompatible with Linux" % pkg) | 324 | logger.debug(2, "Skipping %s since it's incompatible with Linux" % pkg) |
324 | return False | 325 | return False |
325 | return True | 326 | return True |