]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipetool: fixed uncaught NameError exception
authorSarah Marsh <sarah.marsh.engineer@gmail.com>
Thu, 26 Apr 2018 01:35:25 +0000 (20:35 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 3 May 2018 09:03:27 +0000 (10:03 +0100)
When packaging a node application, a `NameError` can be thrown in create_npm.py if an optional npm dependency does not
support Linux.

Signed-off-by: Sarah Marsh <sarah.marsh@arm.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/recipetool/create_npm.py

index fb57e705f25c6ff4a8fd084d0dd04b3946f24466..bb42a5ca5c0742161cc247857fa8b46eaca92b45 100644 (file)
@@ -320,6 +320,7 @@ class NpmRecipeHandler(RecipeHandler):
                     blacklist = True
                     break
             if (not blacklist and 'linux' not in pkg_os) or '!linux' in pkg_os:
+                pkg = pdata.get('name', 'Unnamed package')
                 logger.debug(2, "Skipping %s since it's incompatible with Linux" % pkg)
                 return False
         return True