From: Sarah Marsh Date: Thu, 26 Apr 2018 01:35:25 +0000 (-0500) Subject: recipetool: fixed uncaught NameError exception X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~18119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8293201d98d368d6322eaa960fb3e7cee2ba9368;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Sarah Marsh Signed-off-by: Ross Burton --- diff --git a/scripts/lib/recipetool/create_npm.py b/scripts/lib/recipetool/create_npm.py index fb57e705f25..bb42a5ca5c0 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