]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
pwclient: Rename 'checks' -> 'check-list'
authorStephen Finucane <stephen.finucane@intel.com>
Fri, 26 Feb 2016 19:54:48 +0000 (19:54 +0000)
committerStephen Finucane <stephen.finucane@intel.com>
Thu, 3 Mar 2016 14:45:12 +0000 (14:45 +0000)
Rename this function to ensure all check-related commands have a
'check-' prefix.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Tested-by: Andy Doan <andy.doan@linaro.org>
patchwork/bin/pwclient

index 88cbd0ccd73d98a4dea2bda980f67089940b5691..e9268e92fb187098da00ca1bdb577a99493317b9 100755 (executable)
@@ -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(