MCPcopy Create free account
hub / github.com/ceph/ceph / valid

Method valid

src/pybind/ceph_argparse.py:651–658  ·  view source on GitHub ↗
(self, s, partial=False)

Source from the content-addressed store, hash-verified

649 self.strings = strings.split('|')
650
651 def valid(self, s, partial=False):
652 lower_case = s.lower()
653 if lower_case in ['true', '1']:
654 self.val = True
655 elif lower_case in ['false', '0']:
656 self.val = False
657 else:
658 raise ArgumentValid("{0} not one of 'true', 'false'".format(s))
659
660 def __str__(self):
661 return '<bool>'

Callers

nothing calls this directly

Calls 2

ArgumentValidClass · 0.85
formatMethod · 0.45

Tested by

no test coverage detected