]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/ceph_argparse: accept flexible req 20791/head
authorGu Zhongyan <guzhongyan@360.cn>
Fri, 9 Mar 2018 01:53:56 +0000 (09:53 +0800)
committerGu Zhongyan <guzhongyan@360.cn>
Fri, 9 Mar 2018 03:21:15 +0000 (11:21 +0800)
True and true both acceptable

Signed-off-by: Gu Zhongyan <guzhongyan@360.cn>
src/pybind/ceph_argparse.py

index 45049797d5922e6cc5a181f4a1e8d791cf59cc1d..5d587b4ed4b4a032d7873c40ca760aa95d102817 100644 (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'])