mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-04-18 07:35:22 +01:00
Await aiodocker import_image coroutine (#6378)
The aiodocker images.import_image() method returns a coroutine that needs to be awaited, but the code was iterating over it directly, causing "TypeError: 'coroutine' object is not iterable". Fixes SUPERVISOR-13D9 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -144,9 +144,9 @@ async def docker() -> DockerAPI:
|
||||
|
||||
docker_images.inspect.return_value = image_inspect
|
||||
docker_images.list.return_value = [image_inspect]
|
||||
docker_images.import_image.return_value = [
|
||||
{"stream": "Loaded image: test:latest\n"}
|
||||
]
|
||||
docker_images.import_image = AsyncMock(
|
||||
return_value=[{"stream": "Loaded image: test:latest\n"}]
|
||||
)
|
||||
|
||||
docker_images.pull.return_value = AsyncIterator([{}])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user