MCPcopy
hub / github.com/celery/celery / __getitem__

Method __getitem__

celery/security/certificate.py:86–91  ·  view source on GitHub ↗

Get certificate by id.

(self, id: str)

Source from the content-addressed store, hash-verified

84 yield from self._certs.values()
85
86 def __getitem__(self, id: str) -> Certificate:
87 """Get certificate by id."""
88 try:
89 return self._certs[bytes_to_str(id)]
90 except KeyError:
91 raise SecurityError(f'Unknown certificate: {id!r}')
92
93 def add_cert(self, cert: Certificate) -> None:
94 cert_id = bytes_to_str(cert.get_id())

Callers

nothing calls this directly

Calls 1

SecurityErrorClass · 0.90

Tested by

no test coverage detected