1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-03-27 13:53:32 +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,12 +2,6 @@ import os
from ebook_converter.customize.conversion import InputFormatPlugin, OptionRecommendation
from ebook_converter.constants_old import numeric_version
from ebook_converter import walk
__license__ = 'GPL v3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
class RecipeDisabled(Exception):
@@ -141,9 +135,11 @@ class RecipeInput(InputFormatPlugin):
if f.endswith('.opf'):
return os.path.abspath(f)
for f in walk('.'):
if f.endswith('.opf'):
return os.path.abspath(f)
for root, _, fnames in os.walk('.'):
for f in fnames:
f = os.path.join(root, f)
if f.endswith('.opf'):
return os.path.abspath(f)
def postprocess_book(self, oeb, opts, log):
if self.recipe_object is not None: