[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:
co-authored by
Claude Opus 4.5
Cyrus Leung
parent
ac0675ff6b
commit
4dc0d606b7
@@ -606,7 +606,7 @@ class VllmBackend:
|
|||||||
try:
|
try:
|
||||||
with open(filepath) as f:
|
with open(filepath) as f:
|
||||||
hash_content.append(f.read())
|
hash_content.append(f.read())
|
||||||
except Exception:
|
except OSError:
|
||||||
logger.warning("Failed to read file %s", filepath)
|
logger.warning("Failed to read file %s", filepath)
|
||||||
continue
|
continue
|
||||||
code_hash = hashlib.sha256("\n".join(hash_content).encode()).hexdigest()
|
code_hash = hashlib.sha256("\n".join(hash_content).encode()).hexdigest()
|
||||||
|
|||||||
Reference in New Issue
Block a user