recipetool: Fix list concatenation when using edit
Quoted 12 lines · Alex Kiernan via lists.openembedded.org
If there are multiple appends, ensure we concatenate compatible things:
Traceback (most recent call last):
File "/home/akiernan/poky/scripts/recipetool", line 111, in <module>
ret =main()
File "/home/akiernan/poky/scripts/recipetool", line 100, in main
ret =args.func(args)
File "/home/akiernan/poky/scripts/lib/recipetool/edit.py", line 38, in edit
returnscriptutils.run_editor([recipe_path] + appends, logger)
TypeError: can only concatenate list (not "tuple") to list
Quoted 3 lines
Signed-off-by Alex Kiernan <[email protected]>---
I should add a test to this too, since what's there is well tested today (apart from edit!)
Quoted 20 lines
scripts/lib/recipetool/edit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/lib/recipetool/edit.py +1
-2@@ -34,7 +34,7 @@ def edit(args): recipe_path = tinfoil.get_recipe_file(args.target) appends = tinfoil.get_file_appends(recipe_path) - return scriptutils.run_editor([recipe_path] + appends, logger) + return scriptutils.run_editor([recipe_path] + list(appends), logger) def register_commands(subparsers): --2.17.1
Signature · 1 line
Alex Kiernan
Quoted 18 lines · Alex Kiernan
On Fri, Jun 12, 2020 at 2:38 PM Alex Kiernan via lists.openembedded.org <[email protected]
Quoted 1 line
Quoted 14 lines · wrote:
If there are multiple appends, ensure we concatenate compatible things:
Traceback (most recent call last):
File "/home/akiernan/poky/scripts/recipetool", line 111, in
<module>
ret =main()
File "/home/akiernan/poky/scripts/recipetool", line 100, in main
ret =args.func(args)
File "/home/akiernan/poky/scripts/lib/recipetool/edit.py", line
38, in edit
returnscriptutils.run_editor([recipe_path] + appends, logger)
TypeError: can only concatenate list (not "tuple") to list
Quoted 6 lines
Quoted 3 lines
Signed-off-by Alex Kiernan <[email protected]>---
I should add a test to this too, since what's there is well tested today (apart from edit!)
That would be much appreciated as it does have some of our better test coverage!
Cheers,
Richard