MCPcopy Index your code
hub / github.com/docker/docker-py / __str__

Method __str__

docker/errors.py:53–71  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

51 self.explanation = explanation
52
53 def __str__(self):
54 message = super().__str__()
55
56 if self.is_client_error():
57 message = (
58 f'{self.response.status_code} Client Error for '
59 f'{self.response.url}: {self.response.reason}'
60 )
61
62 elif self.is_server_error():
63 message = (
64 f'{self.response.status_code} Server Error for '
65 f'{self.response.url}: {self.response.reason}'
66 )
67
68 if self.explanation:
69 message = f'{message} ("{self.explanation}")'
70
71 return message
72
73 @property
74 def status_code(self):

Callers

nothing calls this directly

Calls 2

is_client_errorMethod · 0.95
is_server_errorMethod · 0.95

Tested by

no test coverage detected