<?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>9736</bug_id>
          
          <creation_ts>2016-06-09 00:44:35 +0000</creation_ts>
          <short_desc>yocto-bsp: unrecognised parameter exception using python3</short_desc>
          <delta_ts>2016-06-20 15:10:23 +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>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.2 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Humberto Ibarra">humberto.ibarra.lopez</reporter>
          <assigned_to name="Humberto Ibarra">humberto.ibarra.lopez</assigned_to>
          <cc>jose.perez.carranza</cc>
    
    <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>62800</commentid>
    <comment_count>0</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-06-09 00:44:35 +0000</bug_when>
    <thetext>Tried to run yocto-bsp script using a recent version of python3 and got the following error:

humberto@humberto-Gazelle-Pro:~/poky/build$ python3 --version
Python 3.4.3
humberto@humberto-Gazelle-Pro:~/poky/build$ yocto-bsp 
Traceback (most recent call last):
  File &quot;/home/humberto/poky/scripts/yocto-bsp&quot;, line 150, in &lt;module&gt;
    ret = main()
  File &quot;/home/humberto/poky/scripts/yocto-bsp&quot;, line 137, in main
    start_logging(loglevel)
  File &quot;/home/humberto/poky/scripts/yocto-bsp&quot;, line 121, in start_logging
    logging.basicConfig(filname = &apos;yocto-bsp.log&apos;, filemode = &apos;w&apos;, level=loglevel)
  File &quot;/usr/lib/python3.4/logging/__init__.py&quot;, line 1760, in basicConfig
    raise ValueError(&apos;Unrecognised argument(s): %s&apos; % keys)
ValueError: Unrecognised argument(s): filemode, filname


This didn&apos;t happen in python 2.7 or earlier versions of python3. I think the problem here is with the &quot;filname&quot; variable, after checking the history I realized this name has always been wrong but the logging system never complained (and apparently no one noticed the file name not showing up in the logging). 

I think it was this change https://hg.python.org/cpython/rev/2bc3e839a3a3/ the one to introduce the check that broke this part.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62826</commentid>
    <comment_count>1</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-06-09 15:09:39 +0000</bug_when>
    <thetext>Checked on 3.4.2 and the exception is not thrown. Checked 3.4.4 also and the exception is there. Seems like this issue only appears with Python &gt;= 3.4.3

Will send the patch in a moment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62838</commentid>
    <comment_count>2</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-06-09 16:01:20 +0000</bug_when>
    <thetext>Sent patch

http://lists.openembedded.org/pipermail/openembedded-core/2016-June/122645.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62930</commentid>
    <comment_count>3</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2016-06-13 16:32:14 +0000</bug_when>
    <thetext>Already in master

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=0aa5c2759901c6e1976eb34ce1d83a584a90f5a6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63155</commentid>
    <comment_count>4</comment_count>
    <who name="Jose Perez C">jose.perez.carranza</who>
    <bug_when>2016-06-20 15:10:23 +0000</bug_when>
    <thetext>Working as expected now

Validated on : commit 7b9e1f5ad8a427356f2ec516b1718138a7d3c64e


**************************************

poky/build$ yocto-bsp
Usage:

 Create a customized Yocto BSP layer.

 usage: yocto-bsp [--version] [--help] COMMAND [ARGS]

 Current &apos;yocto-bsp&apos; commands are:
    create            Create a new Yocto BSP
    list              List available values for options and BSP properties

 See &apos;yocto-bsp help COMMAND&apos; for more information on a specific command.


Options:
  --version    show program&apos;s version number and exit
  -h, --help   show this help message and exit
  -D, --debug  output debug information</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>