pybind/ceph_argparse: accept flexible req

True and true both acceptable

Signed-off-by: Gu Zhongyan <guzhongyan@360.cn>
This commit is contained in:
Gu Zhongyan 2018-03-09 09:53:56 +08:00
parent 9ffbac6fc5
commit 9bdf43e707

View File

@ -618,7 +618,7 @@ class argdesc(object):
else:
self.t = t
self.typeargs = kwargs
self.req = bool(req == True or req == 'True')
self.req = req in (True, 'True', 'true')
self.name = name
self.N = (n in ['n', 'N'])