mirror of
git://git.yoctoproject.org/yocto-autobuilder2.git
synced 2025-07-19 20:59:02 +02:00
reporters/swatbot: Handle missing logs correctly
For reasons unknown, logs may not always be reported, handle this more gracefully so the error is still logged. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
1f07a1768f
commit
dbdc805de0
|
@ -184,11 +184,15 @@ class SwatBotURI(object):
|
||||||
urls = []
|
urls = []
|
||||||
for l in logs:
|
for l in logs:
|
||||||
urls.append('%s/steps/%s/logs/%s' % (build['url'], step_number, l['name']))
|
urls.append('%s/steps/%s/logs/%s' % (build['url'], step_number, l['name']))
|
||||||
|
if urls:
|
||||||
|
urls = " ".join(urls)
|
||||||
|
else:
|
||||||
|
urls = ""
|
||||||
payload = {
|
payload = {
|
||||||
'data': {
|
'data': {
|
||||||
'type': 'StepFailure',
|
'type': 'StepFailure',
|
||||||
'attributes': {
|
'attributes': {
|
||||||
"urls": " ".join(urls),
|
"urls": urls,
|
||||||
"status": s['results'],
|
"status": s['results'],
|
||||||
"stepname": s['name'],
|
"stepname": s['name'],
|
||||||
"stepnumber": s['number'],
|
"stepnumber": s['number'],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user