diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-04-08 17:05:55 -0700 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2010-04-08 17:06:06 -0700 |
commit | 444d86f372b599d0d72c0c8e56ee3cb923ee0515 (patch) | |
tree | 72f8d07dfeb558491b9a9d61cfb0f7f5f3ee43f8 | |
parent | 8a9cae9876019daab44e068b5611a1a9ab34b7bf (diff) |
Using NotHandled/Handled in event handlers is deprecated
Signed-off-by: Chris Larson <chris_larson@mentor.com>
-rw-r--r-- | classes/base.bbclass | 8 | ||||
-rw-r--r-- | classes/failure-cleanup.bbclass | 6 | ||||
-rw-r--r-- | classes/oestats-client.bbclass | 6 | ||||
-rw-r--r-- | classes/packaged-staging.bbclass | 2 | ||||
-rw-r--r-- | classes/recipe_sanity.bbclass | 2 | ||||
-rw-r--r-- | classes/rm_work.bbclass | 2 | ||||
-rw-r--r-- | classes/sanity.bbclass | 3 | ||||
-rw-r--r-- | classes/seppuku.bbclass | 14 | ||||
-rw-r--r-- | classes/tinderclient.bbclass | 6 | ||||
-rw-r--r-- | conf/collections.inc | 2 |
10 files changed, 16 insertions, 35 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index e8657387a3..637bedd588 100644 --- a/classes/base.bbclass +++ b/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 diff --git a/classes/failure-cleanup.bbclass b/classes/failure-cleanup.bbclass index 3870c756c8..0425602ce8 100644 --- a/classes/failure-cleanup.bbclass +++ b/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 } diff --git a/classes/oestats-client.bbclass b/classes/oestats-client.bbclass index e4e6206ac4..4415461364 100644 --- a/classes/oestats-client.bbclass +++ b/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 } diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass index f755d2340d..9c72d11b8c 100644 --- a/classes/packaged-staging.bbclass +++ b/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 () { diff --git a/classes/recipe_sanity.bbclass b/classes/recipe_sanity.bbclass index 9becf49384..127806e6da 100644 --- a/classes/recipe_sanity.bbclass +++ b/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 diff --git a/classes/rm_work.bbclass b/classes/rm_work.bbclass index 0857f49852..e6f3aa012e 100644 --- a/classes/rm_work.bbclass +++ b/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 } diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index e8b6587500..4051d49557 100644 --- a/classes/sanity.bbclass +++ b/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 } diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass index 546738dde8..81e7ff6d37 100644 --- a/classes/seppuku.bbclass +++ b/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 } diff --git a/classes/tinderclient.bbclass b/classes/tinderclient.bbclass index a45c1e679b..7ccc1f2bb4 100644 --- a/classes/tinderclient.bbclass +++ b/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 } diff --git a/conf/collections.inc b/conf/collections.inc index 0572568f06..a69ffed687 100644 --- a/conf/collections.inc +++ b/conf/collections.inc @@ -178,6 +178,4 @@ python collections_eh () { if getName(e) == "ConfigParsed": collections_setup(e.data) - - return NotHandled } |