| Summary: |
yocto-bsp create: no graceful error message for wrong format in input file |
| Product: |
[Build System, Metadata & Runtime] OE-Core
|
Reporter: |
Humberto Ibarra <humberto.ibarra.lopez> |
| Component: |
Scripts and Tools | Assignee: |
Humberto Ibarra <humberto.ibarra.lopez> |
| Status: |
RESOLVED
FIXED
|
QA Contact: |
|
| Severity: |
minor
|
|
|
| Priority: |
Medium
|
CC: |
leonardo.sandoval.gonzalez, ross.burton
|
| Version: |
2.2 | |
|
| Target Milestone: |
2.2 M2 | |
|
| Hardware: |
x86 | |
|
| OS: |
Multiple | |
|
| Whiteboard: |
|
|
OS type for building Yocto:
|
---
|
Type of Regression:
|
---
|
|
Verified:
|
|
Documentation change:
|
No (bug/feature does not impact docs)
|
spinoff from #9720 A file with bad format was given to yocto-bsp create. The script should be expected to fail gracefully but instead it threw an error trace and an exception. Here are the commands executed: $ yocto-bsp list arm properties > arm.properties $ yocto-bsp create myarm arm --infile=arm.properties Traceback (most recent call last): File "/home/lsandov1/poky/scripts/yocto-bsp", line 150, in <module> ret = main() File "/home/lsandov1/poky/scripts/yocto-bsp", line 145, in main invoke_subcommand(args, parser, yocto_bsp_help_usage, subcommands) File "/home/lsandov1/poky/scripts/lib/bsp/help.py", line 73, in invoke_subcommand subcommands.get(args[0], subcommand_error)[0](args[1:], usage) File "/home/lsandov1/poky/scripts/yocto-bsp", line 89, in yocto_bsp_create_subcommand yocto_bsp_create(machine, karch, scripts_path, bsp_output_dir, options.codedump, options.properties_file) File "/home/lsandov1/poky/scripts/lib/bsp/engine.py", line 1615, in yocto_bsp_create yocto_common_create(machine, arch, scripts_path, bsp_output_dir, codedump, properties_file, properties) File "/home/lsandov1/poky/scripts/lib/bsp/engine.py", line 1554, in yocto_common_create properties = json.load(infile) File "/usr/lib/python3.4/json/__init__.py", line 268, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "/usr/lib/python3.4/json/__init__.py", line 318, in loads return _default_decoder.decode(s) File "/usr/lib/python3.4/json/decoder.py", line 346, in decode raise ValueError(errmsg("Extra data", s, end, len(s))) ValueError: Extra data: line 1 column 31 - line 552 column 1 (char 30 - 12750) Need to add a clearer message pointing to the error.