Merge pull request #2709 from coolo/fix_suse_openqa

rabbit-openqa: Don't crash on openqa jobs without BUILD
This commit is contained in:
Stephan Kulow 2022-02-18 15:52:22 +01:00 committed by GitHub
commit a7ac9876b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -216,8 +216,8 @@ class Listener(PubSubConsumer):
'latest': '1',
}
jobs = self.openqa.openqa_request('GET', 'jobs', values)['jobs']
# Ignore PR verification runs
return [job for job in jobs if '/' not in job['settings']['BUILD']]
# Ignore PR verification runs (and jobs without 'BUILD')
return [job for job in jobs if '/' not in job['settings'].get('BUILD', '/')]
def get_step_url(self, testurl, modulename):
failurl = testurl + '/modules/{!s}/fails'.format(quote_plus(modulename))