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

Method valid

src/pybind/ceph_argparse.py:720–725  ·  view source on GitHub ↗
(self, s: str, partial: bool = False)

Source from the content-addressed store, hash-verified

718 CephUUID: pretty self-explanatory
719 """
720 def valid(self, s: str, partial: bool = False) -> None:
721 try:
722 uuid.UUID(s)
723 except Exception as e:
724 raise ArgumentFormat('invalid UUID {0}: {1}'.format(s, e))
725 self.val = s
726
727 def __str__(self) -> str:
728 return '<uuid>'

Callers

nothing calls this directly

Calls 2

ArgumentFormatClass · 0.85
formatMethod · 0.45

Tested by

no test coverage detected