Merge pull request #1309 from lnussel/repochecker

reochecker: avoid accessing empty status
This commit is contained in:
Ludwig Nussel 2018-01-02 11:37:51 +01:00 committed by GitHub
commit 93482faa9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,7 +132,7 @@ class RepoChecker(ReviewBot.ReviewBot):
if not status or str(status['overall_state']) not in ('testing', 'review', 'acceptable'):
# Not in a "ready" state.
openQA_only = False # Not relevant so set to False.
if str(status['overall_state']) == 'failed':
if status and str(status['overall_state']) == 'failed':
# Exception to the rule is openQA only in failed state.
openQA_only = True
for project in api.project_status_walk(status):