Ignoring errors is the default behavior for os.walk
This commit is contained in:
2
setup.py
2
setup.py
@@ -932,7 +932,7 @@ def add_builtin_fonts(args: Options) -> None:
|
|||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
for candidate in candidates:
|
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:
|
if filename in files:
|
||||||
font_file = os.path.join(root, filename)
|
font_file = os.path.join(root, filename)
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user