dotcloud/docker-py — pull request #63 by aanand (2013-10-03 14:22:03+00:00)
Title: Remove custom error message for image 404

For reasons covered in the discussion on #38, I feel a custom error message is unnecessary. The default exception will contain the message from the server, which is explicit enough:

>>> d.create_container('ubuntu', 'bash')
{u'Id': u'7cad7baac3dc'}

>>> d.create_container('doesntexist', 'bash')
Traceback (most recent call last):
File "", line 1, in
File "docker/client.py", line 237, in create_container
return self.create_container_from_config(config)
File "docker/client.py", line 242, in create_container_from_config
return self._result(res, True)
File "docker/client.py", line 82, in _result
self._raise_for_status(response)
File "docker/client.py", line 79, in _raise_for_status
raise APIError(e, response=response, explanation=explanation)
docker.client.APIError: 404 Client Error: Not Found ("No such image: doesntexist (tag: latest)")