mirror of
https://github.com/modelscope/modelscope.git
synced 2026-08-29 10:08:40 +02:00
fix(docker): catch JSONDecodeError when querying Docker Hub tags
Non-JSON Hub responses (block pages, 5xx HTML) would bypass URLError handling and crash json.load; surface them as RuntimeError instead. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -516,7 +516,7 @@ class AmdImageBuilder(Builder):
|
||||
try:
|
||||
with urllib.request.urlopen(req, timeout=60) as resp:
|
||||
payload = json.load(resp)
|
||||
except urllib.error.URLError as exc:
|
||||
except (urllib.error.URLError, json.JSONDecodeError) as exc:
|
||||
raise RuntimeError(
|
||||
f'Failed to query Docker Hub tags for {VLLM_ROCM_REPO}: '
|
||||
f'{exc}') from exc
|
||||
|
||||
Reference in New Issue
Block a user