Skip to content

Commit 5a8a424

Browse files
committed
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]: moby/moby@3043c26 Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 03e43be commit 5a8a424

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docker/models/images.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ def load(self, data):
407407
if match:
408408
image_id = match.group(2)
409409
images.append(image_id)
410-
if 'error' in chunk:
411-
raise ImageLoadError(chunk['error'])
410+
if 'errorDetail' in chunk:
411+
raise ImageLoadError(chunk['errorDetail']['message'])
412412

413413
return [self.get(i) for i in images]
414414

0 commit comments

Comments
 (0)