From 98bea636357da53c59779330866abb1df0c144e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georg=20W=C3=B6lflein?= Date: Sat, 17 May 2025 21:50:04 +0200 Subject: [PATCH] Fix build_image return on string result --- toolarena/runtime.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/toolarena/runtime.py b/toolarena/runtime.py index 7441d6e..e48eb05 100644 --- a/toolarena/runtime.py +++ b/toolarena/runtime.py @@ -214,7 +214,10 @@ def build_image( ) if isinstance(resp, str): - return get_docker().images.get(resp) + # The low-level API may return the image ID as a string when + # `resp` is not a generator. In this case no build logs are + # available, so return an empty iterator for the log stream. + return get_docker().images.get(resp), iter(()) last_event = None image_id = None internal_stream, result_stream = itertools.tee(json_stream(resp))