From: Stephen Finucane Date: Fri, 26 Feb 2016 19:54:48 +0000 (+0000) Subject: pwclient: Rename 'checks' -> 'check-list' X-Git-Tag: v1.1.0~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab6ca23dce105fd6c7c16e93290c9804adaeac92;p=thirdparty%2Fpatchwork.git pwclient: Rename 'checks' -> 'check-list' Rename this function to ensure all check-related commands have a 'check-' prefix. Signed-off-by: Stephen Finucane Tested-by: Andy Doan --- diff --git a/patchwork/bin/pwclient b/patchwork/bin/pwclient index 88cbd0cc..e9268e92 100755 --- a/patchwork/bin/pwclient +++ b/patchwork/bin/pwclient @@ -236,7 +236,7 @@ def action_projects(rpc): 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'])) @@ -474,12 +474,12 @@ def main(): 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') @@ -708,8 +708,6 @@ def main(): elif action.startswith('project'): action_projects(rpc) - elif action.startswith('checks'): - action_checks(rpc) elif action.startswith('state'): action_states(rpc) @@ -766,6 +764,9 @@ def main(): 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(