From f6342633bd21b94762f5c74b4cb168438aefa32c Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 15 Mar 2021 18:27:44 +0800 Subject: [PATCH] pybind/ceph_argparse: do not print flag name before CephChoices in help descs This reverts commit 332abcd25059c3ed07ca5df54110a83e07f28f86. Signed-off-by: Kefu Chai --- src/pybind/ceph_argparse.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pybind/ceph_argparse.py b/src/pybind/ceph_argparse.py index 9e5a42821777d..0b63731815c72 100644 --- a/src/pybind/ceph_argparse.py +++ b/src/pybind/ceph_argparse.py @@ -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 is perfect.