[OE-core] [oe-core][PATCH V2] recipetool: fixed uncaught NameError exception

sarah.marsh.engineer at gmail.com sarah.marsh.engineer at gmail.com
Thu Apr 26 01:35:25 UTC 2018


From: Sarah Marsh <sarah.marsh.engineer at gmail.com>

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 at arm.com>
---
 scripts/lib/recipetool/create_npm.py | 1 +
 1 file changed, 1 insertion(+)

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):
                     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
-- 
2.14.3 (Apple Git-98)




More information about the Openembedded-core mailing list