[Bugfix] Narrow broad exceptions in compilation backends (#31616)

Signed-off-by: c0de128 <kevin.mckay@outlook.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
This commit is contained in:
Kevin McKay
2026-01-09 20:39:22 -06:00
committed by GitHub
parent ac0675ff6b
commit 4dc0d606b7

View File

@@ -606,7 +606,7 @@ class VllmBackend:
try:
with open(filepath) as f:
hash_content.append(f.read())
except Exception:
except OSError:
logger.warning("Failed to read file %s", filepath)
continue
code_hash = hashlib.sha256("\n".join(hash_content).encode()).hexdigest()