[PATCH 2/4] pwclient: Rename 'checks' -> 'check-list'
Stephen Finucane
stephen.finucane at intel.com
Sat Feb 27 06:54:48 AEDT 2016
Rename this function to ensure all check-related commands have a
'check-' prefix.
Signed-off-by: Stephen Finucane <stephen.finucane at intel.com>
---
patchwork/bin/pwclient | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/patchwork/bin/pwclient b/patchwork/bin/pwclient
index 88cbd0c..e9268e9 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(
--
2.0.0
More information about the Patchwork
mailing list