Ignoring errors is the default behavior for os.walk

This commit is contained in:
Kovid Goyal 2026-01-31 08:28:10 +05:30
parent 0a01f41996
commit 524fe6ae3b
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -932,7 +932,7 @@ def add_builtin_fonts(args: Options) -> None:
break
else:
for candidate in candidates:
for root, _, files in os.walk(candidate, onerror=lambda _: None):
for root, _, files in os.walk(candidate):
if filename in files:
font_file = os.path.join(root, filename)
break