Skip to contentSkip to conversation

recipetool: fixed uncaught NameError exception

PATCH New [email protected] 1 participant 1 message Apr 26, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 recipetool: fixed uncaught NameError exception

From: Sarah Marsh <[email protected]>

When packaging a node application, a NameError can be thrown in create_npm.py if an optional npm dependency does not support Linux.

---
 scripts/lib/recipetool/create_npm.py | 1 +
 1 file changed, 1 insertion(+)
scripts/lib/recipetool/create_npm.py +1 -0
index fb57e705f2..bb42a5ca5c 100644
@@ -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
Signature · 1 line
2.14.3 (Apple Git-98)