MCPcopy Create free account
hub / github.com/docker/docker-py / _retrieve_server_version

Method _retrieve_server_version

docker/api/client.py:221–232  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

219 )
220
221 def _retrieve_server_version(self):
222 try:
223 return self.version(api_version=False)["ApiVersion"]
224 except KeyError as ke:
225 raise DockerException(
226 'Invalid response from docker daemon: key "ApiVersion"'
227 ' is missing.'
228 ) from ke
229 except Exception as e:
230 raise DockerException(
231 f'Error while fetching server API version: {e}'
232 ) from e
233
234 def _set_request_timeout(self, kwargs):
235 """Prepare the kwargs for an HTTP request by inserting the timeout

Callers 2

__init__Method · 0.95

Calls 2

DockerExceptionClass · 0.85
versionMethod · 0.45

Tested by 1