summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2007-11-19 08:50:48 +0000
committerKoen Kooi <koen@openembedded.org>2007-11-19 08:50:48 +0000
commitffddd00a3b46c1a4cbf64e4b4d80a18d8a29896b (patch)
treea1d89f8e64c411eeb5d7e0559db8e084036d2b2b /classes
parentcc258b6d3bb217e1543678278bf1eddf31b17d42 (diff)
sepukku: don't log html to file, log more usefull stuff. Debug now looks like:
Logged into the box Adding log file /data/build/koen/OE/build/tmp/angstrom/work/arm-oabi-angstrom-linux/failme-1.0-r0/temp/log.do_configure.23635 Trying http://bugs.openembedded.org/buglist.cgi?product=Openembedded&component=build&short_desc_type=substring&short_desc=failme-1.0-r0-do_configure Result of bug search is Bug is open: False and bug number: 2747 Reopened the bug #2747 Got exception in poster.open( attach_query, param ) Failed to attach the build log for bug #2747
Diffstat (limited to 'classes')
-rw-r--r--classes/seppuku.bbclass18
1 files changed, 11 insertions, 7 deletions
diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass
index 101f621303..c7392565f2 100644
--- a/classes/seppuku.bbclass
+++ b/classes/seppuku.bbclass
@@ -140,11 +140,11 @@ def seppuku_find_bug_report(debug_file, opener, query, product, component, bugna
if len(scanner.result()) == 0:
print >> debug_file, "Scanner failed to scan the html site"
print >> debug_file, "%(query)sproduct=%(product)s&component=%(component)s&short_desc_type=substring&short_desc=%(bugname)s" % vars()
- print >> debug_file, txt
+ #print >> debug_file, txt
return (False,None)
else: # silently pick the first result
print >> debug_file, "Result of bug search is "
- print >> debug_file, txt
+ #print >> debug_file, txt
(number,status) = scanner.result()[0]
return (not status in ["CLOS", "RESO", "VERI"],number)
@@ -237,7 +237,8 @@ def seppuku_create_attachment(debug, poster, attach_query, product, component, b
if not bug_number:
import bb
bb.note("Can't create an attachment, no bugnumber passed to method")
- return False
+ print >> debug, "Can't create an attachment, no bugnumber passed to method"
+ return False
import urllib2
param = { "bugid" : bug_number, "action" : "insert", "data" : file, "description" : "Build log", "ispatch" : "0", "contenttypemethod" : "list", "contenttypeselection" : "text/plain", "comment" : text }
@@ -250,12 +251,15 @@ def seppuku_create_attachment(debug, poster, attach_query, product, component, b
return False
except Exception, e:
print e
- return False
+ print >> debug, "Got exception in poster.open( attach_query, param )"
+ return False
- print >> debug, result.read()
+ txt = result.read()
if result.code != 200:
+ print >> debug, "Got bad return code (%s)" % result.code
return False
else:
+ print >> debug, "Got good return code (200)"
return True
@@ -361,11 +365,11 @@ python seppuku_eventhandler() {
if bug_number and file:
if not seppuku_create_attachment(debug_file, poster, attach, product, component, bug_number, text, file):
- print >> debug_file, "Failed to attach the build log for bug #%" % bug_number
+ print >> debug_file, "Failed to attach the build log for bug #%s" % bug_number
else:
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 #%" % bug_number
+ print >> debug_file, "Not trying to create an attachment for bug #%s" % bug_number
return NotHandled
}