recipetool: create_buildsys_python.py: initialize metadata

In the case pyproject.toml doesn't contains metadatas, the metadata
variable is not initialized and the plugin throws an error and falls back
to another plugin, which is not the desired behaviour. So just ignore
metadata if we don't have them

(From OE-Core rev: 88d15877ba18309c521740d7a9649e14d77189bc)

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Julien Stephan
2023-12-04 16:59:29 +01:00
committed by Richard Purdie
parent 3ee5c86da3
commit 344e10a21b

View File

@@ -726,6 +726,7 @@ class PythonPyprojectTomlRecipeHandler(PythonRecipeHandler):
def process(self, srctree, classes, lines_before, lines_after, handled, extravalues):
info = {}
metadata = {}
if 'buildsystem' in handled:
return False