The author state is not needed for inner loops and print the more detailed state of the review process
This commit is contained in:
parent
479b80ce61
commit
34f929c11b
21
osc-group.py
21
osc-group.py
@ -356,10 +356,25 @@ def _group_list_requests(self, grid, opts):
|
||||
project = str(root.find('action').find('source').attrib['project'])
|
||||
revision = str(root.find('action').find('source').attrib['rev'])
|
||||
date = str(root.find('state').attrib['when'])
|
||||
author = str(root.find('state').attrib['who'])
|
||||
state = str(root.find('state').attrib['name'])
|
||||
|
||||
print('SR#{0} | {1}/{2}:{3} | {4} | {5} | {6}'.format(x, project, package, revision, author, date, state))
|
||||
# instead of just printing the state of the whole request find out who is
|
||||
# remaining on the review and print it out, otherwise print out that it is
|
||||
# ready for approval and waiting on others from GR to be accepted
|
||||
review_state = root.findall('review')
|
||||
failing_groups = []
|
||||
for i in review_state:
|
||||
if not i.attrib['state'] == 'accepted':
|
||||
try:
|
||||
failing_groups.append(i.attrib['by_group'])
|
||||
except KeyError:
|
||||
failing_groups.append(i.attrib['by_user'])
|
||||
|
||||
if not failing_groups:
|
||||
state = 'approvable'
|
||||
else:
|
||||
state = 'missing reviews: ' + ', '.join(failing_groups)
|
||||
|
||||
print('SR#{0} | {1}/{2}:{3} | {5} | {6}'.format(x, project, package, revision, date, state))
|
||||
return
|
||||
|
||||
# search up the GR#s
|
||||
|
Loading…
x
Reference in New Issue
Block a user