<?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>10186</bug_id>
          
          <creation_ts>2016-08-24 22:35:17 +0000</creation_ts>
          <short_desc>Typo in adding an event handler leads to confusing error</short_desc>
          <delta_ts>2016-09-07 07:49:29 +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>BitBake</product>
          <component>bitbake</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>normal</bug_severity>
          <target_milestone>2.2 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Hatle">mark.hatle</reporter>
          <assigned_to name="Markus Lehtonen">markus.lehtonen</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</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>65496</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2016-08-24 22:35:17 +0000</bug_when>
    <thetext>Create a class that looks like:

addhandler my_test_handler


Include the class, and the following error occurs:

ERROR: Error parsing configuration files
Traceback (most recent call last):
  File &quot;/home/mhatle/git/oss/oe-core/bitbake/lib/bb/cookerdata.py&quot;, line 265, in CookerDataBuilder.parseBaseConfiguration():
                 bb.parse.init_parser(self.basedata)
    &gt;            self.data = self.parseConfigurationFiles(self.prefiles, self.postfiles)
     
  File &quot;/home/mhatle/git/oss/oe-core/bitbake/lib/bb/cookerdata.py&quot;, line 360, in CookerDataBuilder.parseConfigurationFiles(prefiles=[], postfiles=[]):
                 handlerfn = data.getVarFlag(var, &quot;filename&quot;, False)
    &gt;            handlerln = int(data.getVarFlag(var, &quot;lineno&quot;, False))
                 bb.event.register(var, data.getVar(var, False),  (data.getVarFlag(var, &quot;eventmask&quot;, True) or &quot;&quot;).split(), handlerfn, handlerln)
TypeError: int() argument must be a string, a bytes-like object or a number, not &apos;NoneType&apos;


It would be better if bitbake reported &quot;unable to find event handler &apos;my_test_handler&apos;&quot; or something like that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65607</commentid>
    <comment_count>1</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-08-30 09:54:36 +0000</bug_when>
    <thetext>Patch sent for review:
https://patchwork.openembedded.org/patch/130609/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65857</commentid>
    <comment_count>2</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-09-07 07:49:29 +0000</bug_when>
    <thetext>Fixed in:
http://git.openembedded.org/bitbake/commit/?id=107c47c4e6de6a596cf1aeca5c18dbc1c5b44dc4</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>