project['name']))
-def action_checks(rpc):
+def action_check_list(rpc):
checks = rpc.check_list()
for check in checks:
print("%d (for '%s')" % (check['id'], check['patch']))
help='''List all projects'''
)
projects_parser.set_defaults(subcmd='projects')
- checks_parser = subparsers.add_parser(
- 'checks',
+ check_list_parser = subparsers.add_parser(
+ 'check-list',
add_help=False,
- help='''Show list of patch checks'''
+ help='''List all checks'''
)
- checks_parser.set_defaults(subcmd='checks')
+ check_list_parser.set_defaults(subcmd='check_list')
check_create_parser = subparsers.add_parser(
'check-create', parents=[hash_parser], conflict_handler='resolve',
help='Add a check to a patch')
elif action.startswith('project'):
action_projects(rpc)
- elif action.startswith('checks'):
- action_checks(rpc)
elif action.startswith('state'):
action_states(rpc)
archived=archived_str, commit=commit_str
)
+ elif action == 'check_list':
+ action_check_list(rpc)
+
elif action == 'check_create':
for patch_id in non_empty(h, patch_ids):
action_check_create(