Merge pull request #1743 from larsks/feature/expose-api-errors
Do not erroneously mask exceptions in docker module
This commit is contained in:
commit
fa85d95910
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue