Merge pull request #1743 from larsks/feature/expose-api-errors

Do not erroneously mask exceptions in docker module
This commit is contained in:
Brian Coca 2015-07-16 15:38:51 -04:00
commit fa85d95910

View file

@ -389,6 +389,7 @@ from urlparse import urlparse
try:
import docker.client
import docker.utils
import docker.errors
from requests.exceptions import RequestException
except ImportError:
HAS_DOCKER_PY = False
@ -1322,7 +1323,10 @@ class DockerManager(object):
try:
containers = do_create(count, params)
except:
except docker.errors.APIError as e:
if e.response.status_code != 404:
raise
self.pull_image()
containers = do_create(count, params)