Skip to content

Commit

Permalink
Merge pull request #40111 from tchaikov/wip-ceph-argparse-no-option-name
Browse files Browse the repository at this point in the history
pybind/ceph_argparse: do not print flag name before CephChoices in he…

Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Adam King <adking@redhat.com>
  • Loading branch information
tchaikov committed Mar 15, 2021
2 parents f29cae0 + f634263 commit be47852
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/pybind/ceph_argparse.py
Expand Up @@ -830,10 +830,8 @@ def helpstr(self):
"""
if self.t == CephBool:
chunk = "--{0}".format(self.name.replace("_", "-"))
elif self.t == CephPrefix:
elif self.t == CephPrefix or self.t == CephChoices:
chunk = str(self.instance)
elif self.t == CephChoices:
chunk = f'--{self.name} {{{str(self.instance)}}}'
elif self.t == CephOsdName:
# it just so happens all CephOsdName commands are named 'id' anyway,
# so <id|osd.id> is perfect.
Expand Down

0 comments on commit be47852

Please sign in to comment.