summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-11-13 11:00:25 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-04 17:23:59 +0000
commit2d9aecf044bd14518d1f645ef759e49dde0ca199 (patch)
tree5ef2c26a6d57d2e7a1092b29c8082d51a8712a18 /scripts
parentc32f44ebf5d088061fa67317e1cdc8aab041bc2b (diff)
downloadpoky-2d9aecf044bd14518d1f645ef759e49dde0ca199.tar.gz
recipetool: create: fix failure handling included dicts
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 (From OE-Core rev: 49b2d571da88fb2afce71835276523ed3538d31f) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/recipetool/create_buildsys_python.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py
index ec5449bee9..5bd2aa337c 100644
--- a/scripts/lib/recipetool/create_buildsys_python.py
+++ b/scripts/lib/recipetool/create_buildsys_python.py
@@ -356,6 +356,8 @@ class PythonRecipeHandler(RecipeHandler):
356 # Naive mapping of setup() arguments to PKG-INFO field names 356 # Naive mapping of setup() arguments to PKG-INFO field names
357 for d in [info, non_literals]: 357 for d in [info, non_literals]:
358 for key, value in list(d.items()): 358 for key, value in list(d.items()):
359 if key is None:
360 continue
359 new_key = _map(key) 361 new_key = _map(key)
360 if new_key != key: 362 if new_key != key:
361 del d[key] 363 del d[key]