python handleFail() { from oe import expand from oe.event import Handled, NotHandled import os if getattr(e, "__name__", None) == None: name = e.__class__.__name__ else: name = e.__name__ if name == "TaskFailed" or name == "TaskStarted" or name == "TaskSucceeded": print "Caught %s event of %s" % (name, e.task) return Handled return NotHandled } addhandler handleFail python PkgEvent() { from oe import expand from oe.event import Handled, NotHandled import os if getattr(e, "__name__", None) == None: name = e.__class__.__name__ else: name = e.__name__ if name == "PkgFailed" or name == "PkgStarted" or name == "PkgSucceeded": print "Caught %s event of %s" % (name, e.pkg) return Handled return NotHandled } addhandler PkgEvent do_compile() { exit 1 }