mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-05 05:28:13 +02:00
fixed final edgecase
This commit is contained in:
@ -154,7 +154,7 @@ def try_read_file(fname: str) -> str:
|
|||||||
try:
|
try:
|
||||||
with open(fname, "r", encoding="utf-8") as f:
|
with open(fname, "r", encoding="utf-8") as f:
|
||||||
return f.read()
|
return f.read()
|
||||||
except FileNotFoundError:
|
except (UnicodeDecodeError, FileNotFoundError):
|
||||||
return "Binary file (from filesystem), to be ignored"
|
return "Binary file (from filesystem), to be ignored"
|
||||||
except IsADirectoryError:
|
except IsADirectoryError:
|
||||||
return "File listed in PR is a directory (likely a submodule), to be ignored"
|
return "File listed in PR is a directory (likely a submodule), to be ignored"
|
||||||
|
Reference in New Issue
Block a user