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

Method valid

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

Source from the content-addressed store, hash-verified

369 Admin socket path; check that it's readable and S_ISSOCK
370 """
371 def valid(self, s: str, partial: bool = False) -> None:
372 mode = os.stat(s).st_mode
373 if not stat.S_ISSOCK(mode):
374 raise ArgumentValid('socket path {0} is not a socket'.format(s))
375 self.val = s
376
377 def __str__(self) -> str:
378 return '<admin-socket-path>'

Callers

nothing calls this directly

Calls 3

ArgumentValidClass · 0.85
statMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected