Skip to content
Browse files

Using NotHandled/Handled in event handlers is deprecated

Signed-off-by: Chris Larson <chris_larson@mentor.com>
  • Loading branch information...
1 parent 8a9cae9 commit 444d86f372b599d0d72c0c8e56ee3cb923ee0515 @kergoth kergoth committed
View
8 classes/base.bbclass
@@ -263,7 +263,7 @@ python base_do_unpack() {
addhandler base_eventhandler
python base_eventhandler() {
from bb import note, error, data
- from bb.event import Handled, NotHandled, getName
+ from bb.event import getName
name = getName(e)
@@ -272,7 +272,7 @@ python base_eventhandler() {
elif name == "UnsatisfiedDep":
msg = "package %s: dependency %s %s" % (e.pkg, e.dep, name[:-3].lower())
else:
- return NotHandled
+ return
# Only need to output when using 1.8 or lower, the UI code handles it
# otherwise
@@ -309,15 +309,13 @@ python base_eventhandler() {
os.system('touch ' + e.stampPrefix[fn] + '.needclean')
if not data in e.__dict__:
- return NotHandled
+ return
log = data.getVar("EVENTLOG", e.data, 1)
if log:
logfile = file(log, "a")
logfile.write("%s\n" % msg)
logfile.close()
-
- return NotHandled
}
addtask configure after do_unpack do_patch
View
6 classes/failure-cleanup.bbclass
@@ -4,15 +4,13 @@
addhandler failure_eventhandler
python failure_eventhandler() {
from bb import build, event, note, error, data
- from bb.event import NotHandled, getName
+ from bb.event import getName
if e.data is None or getName(e) == "MsgNote":
- return NotHandled
+ return
name = getName(e)
if name == "PkgFailed":
bb.note("Exectuting -c clean on failed build")
build.exec_func('do_clean', e.data)
-
- return NotHandled
}
View
6 classes/oestats-client.bbclass
@@ -178,14 +178,14 @@ python oestats_eventhandler () {
import time
if e.data is None or getName(e) == "MsgNote":
- return NotHandled
+ return
server = bb.data.getVar('OESTATS_SERVER', e.data, True)
if not server.startswith('http://') and not server.startswith('https://'):
server = "http://%s" %(server)
builder = bb.data.getVar('OESTATS_BUILDER', e.data, True)
if not server or not builder:
- return NotHandled
+ return
if getName(e) == 'BuildStarted':
oestats_start(server, builder, e.data)
@@ -197,6 +197,4 @@ python oestats_eventhandler () {
oestats_task(server, e.data, e.task, 'Succeeded')
elif getName(e) == 'TaskFailed':
oestats_task(server, e.data, e.task, 'Failed')
-
- return NotHandled
}
View
2 classes/packaged-staging.bbclass
@@ -262,8 +262,6 @@ python packagedstage_stampfixing_eventhandler() {
dir = "%s.do_%s" % (e.stampPrefix[fn], task)
os.system('rm -f ' + dir)
os.system('rm -f ' + stamp)
-
- return NotHandled
}
populate_staging_preamble () {
View
2 classes/recipe_sanity.bbclass
@@ -150,7 +150,7 @@ python recipe_sanity_eh () {
from bb.event import getName
if getName(e) != "ConfigParsed":
- return NotHandled
+ return
d = e.data
View
2 classes/rm_work.bbclass
@@ -44,7 +44,5 @@ python rmwork_stampfixing_eventhandler() {
dir = "%s.*" % e.stampPrefix[fn]
bb.note("Removing stamps: " + dir)
os.system('rm -f '+ dir)
-
- return NotHandled
}
View
3 classes/sanity.bbclass
@@ -180,9 +180,6 @@ def check_sanity(e):
addhandler check_sanity_eventhandler
python check_sanity_eventhandler() {
- from bb.event import Handled, NotHandled
if bb.event.getName(e) == "ConfigParsed":
check_sanity(e)
-
- return NotHandled
}
View
14 classes/seppuku.bbclass
@@ -279,7 +279,7 @@ python seppuku_eventhandler() {
Report task failures to the bugzilla
and succeeded builds to the box
"""
- from bb.event import NotHandled, getName
+ from bb.event import getName
from bb import data, mkdirhier, build
import bb, os, glob
@@ -288,20 +288,20 @@ python seppuku_eventhandler() {
name = getName(event)
if name == "MsgNote":
# avoid recursion
- return NotHandled
+ return
# Try to load our exotic libraries
try:
import MultipartPostHandler
except:
bb.note("You need to put the MultipartPostHandler into your PYTHONPATH. Download it from http://pipe.scs.fsu.edu/PostHandler/MultipartPostHandler.py")
- return NotHandled
+ return
try:
import urllib2, cookielib
except:
bb.note("Failed to import the cookielib and urllib2, make sure to use python2.4")
- return NotHandled
+ return
if name == "PkgFailed":
if not bb.data.getVar('SEPPUKU_AUTOBUILD', data, True) == "0":
@@ -331,7 +331,7 @@ python seppuku_eventhandler() {
if not seppuku_login(opener, login, user, passw):
bb.note("Login to bugzilla failed")
print >> debug_file, "Login to bugzilla failed"
- return NotHandled
+ return
else:
print >> debug_file, "Logged into the box"
@@ -364,7 +364,7 @@ python seppuku_eventhandler() {
print >> debug_file, "Created an attachment for '%s' '%s' '%s'" % (product, component, bug_number)
else:
print >> debug_file, "Not trying to create an attachment for bug #%s" % bug_number
- return NotHandled
+ return
if bug_number and not bug_open:
if not seppuku_reopen_bug(poster, reopen, product, component, bug_number, bugname, text):
@@ -390,6 +390,4 @@ python seppuku_eventhandler() {
if bug_number:
bb.data.setVar('OESTATS_BUG_NUMBER', bug_number, event.data)
bb.data.setVar('OESTATS_BUG_TRACKER', "http://bugs.openembedded.net/", event.data)
-
- return NotHandled
}
View
6 classes/tinderclient.bbclass
@@ -378,14 +378,12 @@ def tinder_do_tinder_report(event):
addhandler tinderclient_eventhandler
python tinderclient_eventhandler() {
from bb import note, error, data
- from bb.event import NotHandled, getName
+ from bb.event import getName
if e.data is None or getName(e) == "MsgNote":
- return NotHandled
+ return
do_tinder_report = data.getVar('TINDER_REPORT', e.data, True)
if do_tinder_report and do_tinder_report == "1":
tinder_do_tinder_report(e)
-
- return NotHandled
}
View
2 conf/collections.inc
@@ -178,6 +178,4 @@ python collections_eh () {
if getName(e) == "ConfigParsed":
collections_setup(e.data)
-
- return NotHandled
}

0 comments on commit 444d86f

Please sign in to comment.
Something went wrong with that request. Please try again.