Skip to content

Commit 447202e

Browse files
committed
cli: Make 'info' options mutually exclusive
Doing otherwise doesn't really make much sense
1 parent cd5a9f0 commit 447202e

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

bugzilla.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Get a list of products
213213
List the components in the given product
214214
.IP "--component_owners=PRODUCT, -o PRODUCT"
215215
List components (and their owners)
216-
.IP "--versions=VERSION, -v VERSION"
216+
.IP "--versions=PRODUCT, -v PRODUCT"
217217
List the versions for the given product
218218

219219

bugzilla/_cli.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,13 +346,14 @@ def _setup_action_info_parser(subparsers):
346346
"bugzilla server.")
347347
p = subparsers.add_parser("info", description=description)
348348

349-
p.add_argument('-p', '--products', action='store_true',
349+
x = p.add_mutually_exclusive_group()
350+
x.add_argument('-p', '--products', action='store_true',
350351
help='Get a list of products')
351-
p.add_argument('-c', '--components', metavar="PRODUCT",
352+
x.add_argument('-c', '--components', metavar="PRODUCT",
352353
help='List the components in the given product')
353-
p.add_argument('-o', '--component_owners', metavar="PRODUCT",
354+
x.add_argument('-o', '--component_owners', metavar="PRODUCT",
354355
help='List components (and their owners)')
355-
p.add_argument('-v', '--versions', metavar="VERSION",
356+
x.add_argument('-v', '--versions', metavar="PRODUCT",
356357
help='List the versions for the given product')
357358

358359

0 commit comments

Comments
 (0)