diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-04-08 16:30:52 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-02 15:41:31 +0100 |
commit | ac170b0c346184bd8ba2fe1d56ccb9ea003b1a40 (patch) | |
tree | 2de289d82e6b76a94a38cc3da5da69958d4f20b2 /bitbake/doc | |
parent | 0d25a516b4f6f2feb4ca99d46d1958ccd9734c9b (diff) | |
download | poky-ac170b0c346184bd8ba2fe1d56ccb9ea003b1a40.tar.gz |
bb.event: NotHandled and Handled are on the way out
(Bitbake rev: ed35b30f8e09b0bfc15102fa6483c55d6b7d61de)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/doc')
-rw-r--r-- | bitbake/doc/manual/usermanual.xml | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bitbake/doc/manual/usermanual.xml b/bitbake/doc/manual/usermanual.xml index 6424a7ebd9..bd44a69e3f 100644 --- a/bitbake/doc/manual/usermanual.xml +++ b/bitbake/doc/manual/usermanual.xml | |||
@@ -215,13 +215,11 @@ addtask printdate before do_build</screen></para> | |||
215 | <para>BitBake allows to install event handlers. Events are triggered at certain points during operation, such as, the beginning of operation against a given .bb, the start of a given task, task failure, task success, et cetera. The intent was to make it easy to do things like email notifications on build failure.</para> | 215 | <para>BitBake allows to install event handlers. Events are triggered at certain points during operation, such as, the beginning of operation against a given .bb, the start of a given task, task failure, task success, et cetera. The intent was to make it easy to do things like email notifications on build failure.</para> |
216 | <para><screen>addhandler myclass_eventhandler | 216 | <para><screen>addhandler myclass_eventhandler |
217 | python myclass_eventhandler() { | 217 | python myclass_eventhandler() { |
218 | from bb.event import NotHandled, getName | 218 | from bb.event import getName |
219 | from bb import data | 219 | from bb import data |
220 | 220 | ||
221 | print "The name of the Event is %s" % getName(e) | 221 | print "The name of the Event is %s" % getName(e) |
222 | print "The file we run for is %s" % data.getVar('FILE', e.data, True) | 222 | print "The file we run for is %s" % data.getVar('FILE', e.data, True) |
223 | |||
224 | return NotHandled | ||
225 | } | 223 | } |
226 | </screen></para><para> | 224 | </screen></para><para> |
227 | This event handler gets called every time an event is triggered. A global variable <varname>e</varname> is defined. <varname>e</varname>.data contains an instance of bb.data. With the getName(<varname>e</varname>) | 225 | This event handler gets called every time an event is triggered. A global variable <varname>e</varname> is defined. <varname>e</varname>.data contains an instance of bb.data. With the getName(<varname>e</varname>) |