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-05-04 13:28:01 +0100 |
commit | d845b9960b177cf094c4d1564e7a371aa5377c7e (patch) | |
tree | 8fff49aff381521944a922bf9f3dc6cf8e4306c8 /scripts | |
parent | ea604b4dbabaa8e570d6e2c9b0862d2dd9683dcb (diff) | |
download | poky-d845b9960b177cf094c4d1564e7a371aa5377c7e.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)
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>
Diffstat (limited to 'scripts')
-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 |