From: Kefu Chai Date: Mon, 15 Mar 2021 10:27:44 +0000 (+0800) Subject: pybind/ceph_argparse: do not print flag name before CephChoices in help descs X-Git-Tag: v17.1.0~2617^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F40111%2Fhead;p=ceph.git pybind/ceph_argparse: do not print flag name before CephChoices in help descs This reverts commit 332abcd25059c3ed07ca5df54110a83e07f28f86. Signed-off-by: Kefu Chai --- diff --git a/src/pybind/ceph_argparse.py b/src/pybind/ceph_argparse.py index 9e5a42821777..0b63731815c7 100644 --- a/src/pybind/ceph_argparse.py +++ b/src/pybind/ceph_argparse.py @@ -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 is perfect.