Conversation
hm we're doing two sets of changes in one commit here :/ One adding the filtering when listing, the other processing all the pending requests |
for actionid in args.actionid: | ||
args.status = "Awaiting Review" | ||
if not args.actionid: | ||
print 'Processing all requests with status: %s' % args.status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we ask for a yes/no confirmation here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Mo, Nov 16, 2015 at 10:38:53 -0800, Pierre-Yves Chibon wrote:
@@ -378,7 +389,14 @@ def do_process(args):
'''
LOG.info("user : {0}".format(args.username))
- for actionid in args.actionid:
- args.status = "Awaiting Review"
- if not args.actionid:
print 'Processing all requests with status: %s' % args.status
Should we ask for a yes/no confirmation here?
Since there will be a confirmation for each request, I do not think an
extra confirmation is needed here.
On Mo, Nov 16, 2015 at 10:37:04 -0800, Pierre-Yves Chibon wrote:
The filtering is a side effect, because do_list expects the args.package Therefore the easiest way was to just add the arguments for filtering to |
@@ -378,7 +389,14 @@ def do_process(args): | |||
''' | |||
LOG.info("user : {0}".format(args.username)) | |||
|
|||
for actionid in args.actionid: | |||
args.status = "Awaiting Review" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should define this one within the if
as it is not used otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, good catch, I fixed it.
for cnt, action in enumerate(data['actions']): | ||
print _action2msg(action) | ||
ids.append(action["id"]) | ||
|
||
print 'Total: {0} actions'.format(cnt + 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems.. untrue. If zero actions are listed here, then it will print '1' action.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in the second commit
Agreed, let's merge and make a release |
Allow to process all admin requests
No description provided.