]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipetool: create: fix failure handling included dicts
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Sun, 12 Nov 2017 22:00:25 +0000 (11:00 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 4 Dec 2017 17:14:33 +0000 (17:14 +0000)
If a setup dict in a python setup.py file pulled in the contents of
another dict (e.g.  **otherdict), then we got an error when mapping
the keys because the key is None in that case. Skip those keys to avoid
the error (we pick up the values directly in any case).

A quick reproducer for this issue:

recipetool create https://files.pythonhosted.org/packages/source/p/pyqtgraph/pyqtgraph-0.10.0.tar.gz

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit ae62a9953e219df5147ed4a5ae3f4163d51cff28)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
scripts/lib/recipetool/create_buildsys_python.py

index ec5449bee99fff4c56f12d4ac973297d6f570fd1..5bd2aa337c5ab4ed16e0adba9801aa8c4d83d4e3 100644 (file)
@@ -356,6 +356,8 @@ class PythonRecipeHandler(RecipeHandler):
         # Naive mapping of setup() arguments to PKG-INFO field names
         for d in [info, non_literals]:
             for key, value in list(d.items()):
+                if key is None:
+                    continue
                 new_key = _map(key)
                 if new_key != key:
                     del d[key]