Skip to content

Commit

Permalink
pybind/ceph_argparse: do not print flag name before CephChoices in he…
Browse files Browse the repository at this point in the history
…lp descs

This reverts commit 332abcd.

Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Mar 15, 2021
1 parent a5d6ecd commit f634263
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 f634263

Please sign in to comment.