<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9750</bug_id>
          
          <creation_ts>2016-06-09 17:20:36 +0000</creation_ts>
          <short_desc>yocto-bsp create: no graceful error message for wrong format in input file</short_desc>
          <delta_ts>2016-07-07 14:57:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>Scripts and Tools</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>2.2 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Humberto Ibarra">humberto.ibarra.lopez</reporter>
          <assigned_to name="Humberto Ibarra">humberto.ibarra.lopez</assigned_to>
          <cc>leonardo.sandoval.gonzalez</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>62862</commentid>
    <comment_count>0</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-06-09 17:20:36 +0000</bug_when>
    <thetext>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 &gt; arm.properties
$ yocto-bsp create myarm arm --infile=arm.properties 
Traceback (most recent call last):
  File &quot;/home/lsandov1/poky/scripts/yocto-bsp&quot;, line 150, in &lt;module&gt;
    ret = main()
  File &quot;/home/lsandov1/poky/scripts/yocto-bsp&quot;, line 145, in main
    invoke_subcommand(args, parser, yocto_bsp_help_usage, subcommands)
  File &quot;/home/lsandov1/poky/scripts/lib/bsp/help.py&quot;, line 73, in invoke_subcommand
    subcommands.get(args[0], subcommand_error)[0](args[1:], usage)
  File &quot;/home/lsandov1/poky/scripts/yocto-bsp&quot;, line 89, in yocto_bsp_create_subcommand
    yocto_bsp_create(machine, karch, scripts_path, bsp_output_dir, options.codedump, options.properties_file)
  File &quot;/home/lsandov1/poky/scripts/lib/bsp/engine.py&quot;, line 1615, in yocto_bsp_create
    yocto_common_create(machine, arch, scripts_path, bsp_output_dir, codedump, properties_file, properties)
  File &quot;/home/lsandov1/poky/scripts/lib/bsp/engine.py&quot;, line 1554, in yocto_common_create
    properties = json.load(infile)
  File &quot;/usr/lib/python3.4/json/__init__.py&quot;, line 268, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File &quot;/usr/lib/python3.4/json/__init__.py&quot;, line 318, in loads
    return _default_decoder.decode(s)
  File &quot;/usr/lib/python3.4/json/decoder.py&quot;, line 346, in decode
    raise ValueError(errmsg(&quot;Extra data&quot;, 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63639</commentid>
    <comment_count>1</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-07-04 19:54:08 +0000</bug_when>
    <thetext>Sent patch

https://lists.yoctoproject.org/pipermail/poky/2016-July/010609.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63722</commentid>
    <comment_count>2</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-07-07 14:57:12 +0000</bug_when>
    <thetext>Already in master

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=4252ec78a491f2828fb39d2087ace6e4c1339414</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>