1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-03-15 22:23:42 +01:00

Removed facade on os.walk.

This commit is contained in:
2020-10-13 20:32:05 +02:00
parent b44926a6eb
commit 22fed6f4d3
9 changed files with 53 additions and 55 deletions

View File

@@ -2,7 +2,6 @@ import os
from collections import defaultdict
from threading import Thread
from ebook_converter import walk
from ebook_converter.constants_old import DEBUG
from ebook_converter.constants_old import filesystem_encoding
from ebook_converter.utils.fonts.metadata import FontMetadata, UnsupportedFont
@@ -296,7 +295,9 @@ class FontScanner(Thread):
if not os.path.isdir(folder):
continue
try:
files = tuple(walk(folder))
files = tuple([os.path.join(root, f)
for root, _, fnames in os.walk(folder)
for f in fnames])
except EnvironmentError as e:
if DEBUG:
print(f'Failed to walk font folder: {folder}, {e}')