fixed final edgecase

This commit is contained in:
Karma Riuk
2025-03-30 10:58:48 +02:00
parent d24c9d8461
commit 308f58b587

View File

@ -154,7 +154,7 @@ def try_read_file(fname: str) -> str:
try:
with open(fname, "r", encoding="utf-8") as f:
return f.read()
except FileNotFoundError:
except (UnicodeDecodeError, FileNotFoundError):
return "Binary file (from filesystem), to be ignored"
except IsADirectoryError:
return "File listed in PR is a directory (likely a submodule), to be ignored"