]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
pybind/ceph_argparse: do not print flag name before CephChoices in help descs
authorKefu Chai <kchai@redhat.com>
Mon, 15 Mar 2021 10:27:44 +0000 (18:27 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 15 Mar 2021 10:28:29 +0000 (18:28 +0800)
This reverts commit 332abcd25059c3ed07ca5df54110a83e07f28f86.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/ceph_argparse.py

index 9e5a42821777dc08459c5c5deaa3476d52371245..0b63731815c726c1302c1dc82ea1ce66af0fb167 100644 (file)
@@ -830,10 +830,8 @@ class argdesc(object):
         """
         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.