mirror of https://github.com/docker/docker-py.git
image load: don't depend on deprecated JSONMessage.error field
The error field was deprecated in favor of the errorDetail struct in
[moby@3043c26], but the API continued to return both. This patch updates
docker-py to not depend on the deprecated field.
[moby@3043c26]: 3043c26419
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
03e43be6af
commit
5a8a42466e
|
@ -407,8 +407,8 @@ class ImageCollection(Collection):
|
|||
if match:
|
||||
image_id = match.group(2)
|
||||
images.append(image_id)
|
||||
if 'error' in chunk:
|
||||
raise ImageLoadError(chunk['error'])
|
||||
if 'errorDetail' in chunk:
|
||||
raise ImageLoadError(chunk['errorDetail']['message'])
|
||||
|
||||
return [self.get(i) for i in images]
|
||||
|
||||
|
|
Loading…
Reference in New Issue