Better messages and prevent goodrepo attribute is not exist

This commit is contained in:
Max Lin 2016-02-25 23:03:42 +08:00
parent 806fb3e158
commit 62783ba402

View File

@ -412,6 +412,11 @@ def _check_repo_group(self, id_, requests, skip_cycle=None, debug=False):
for rq in requests: for rq in requests:
if updated.get(rq.request_id, False) or rq.updated: if updated.get(rq.request_id, False) or rq.updated:
continue continue
if not hasattr(rq, 'goodrepo'):
msg = 'Can not find a good repo for %s' % rq.str_compact()
print 'NOT ACCEPTED - ', msg
print 'Perhaps this request is not against i586/x86_64 build or i586 build only. For human to check!'
continue
msg = 'Builds for repo %s' % rq.goodrepo msg = 'Builds for repo %s' % rq.goodrepo
print 'ACCEPTED', msg print 'ACCEPTED', msg
self.checkrepo.change_review_state(rq.request_id, 'accepted', message=msg) self.checkrepo.change_review_state(rq.request_id, 'accepted', message=msg)