From: Holger Freyther Date: Fri, 16 Mar 2007 21:06:47 +0000 (+0000) Subject: classes/seppuku.bbclass: Make it work with OpenEmbedded bugtracker X-Git-Tag: Release-2010-05/1~8868^2~1086^2~6^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1977f9a109dac503efc20651adde01c28a92fd4f;p=openembedded.git classes/seppuku.bbclass: Make it work with OpenEmbedded bugtracker Do not error out on python2.5 when splitting the url. We had an empty key and a none value. If there was no output file, do not error. This check is the same as in tinderclient.bbclass --- diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass index 7962cfbeb9..4c0d4f9a82 100644 --- a/classes/seppuku.bbclass +++ b/classes/seppuku.bbclass @@ -15,6 +15,8 @@ def seppuku_spliturl(url): param = {} for par in query.split("&"): (key,value) = urllib.splitvalue(par) + if not key or len(key) == 0 or not value: + continue key = urllib.unquote(key) value = urllib.unquote(value) param[key] = value @@ -289,6 +291,7 @@ python seppuku_eventhandler() { else: print "Logged into the box" + file = None if name == "TaskFailed": bugname = "%(package)s-%(pv)s-%(pr)s-%(task)s" % { "package" : bb.data.getVar("PN", data, True), "pv" : bb.data.getVar("PV", data, True), @@ -296,11 +299,11 @@ python seppuku_eventhandler() { "task" : e.task } log_file = glob.glob("%s/log.%s.*" % (bb.data.getVar('T', event.data, True), event.task)) text = "The package failed to build at %s" % bb.data.getVar('DATETIME', data, True) - file = open(log_file[0], 'r') + if len(log_file) != 0: + file = open(log_file[0], 'r') elif name == "NoProvider": bugname = "noprovider for %s runtime: %s" % (event.getItem, event.getisRuntime) text = "Please fix it" - file = None else: assert False