1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-20 05:03:35 +02:00

Removed superfluous lopen builtin

This commit is contained in:
2020-04-20 21:12:22 +02:00
parent 3ca3f08054
commit 9e076e0af4
38 changed files with 107 additions and 195 deletions

View File

@@ -53,7 +53,7 @@ class OEBOutput(OutputFormatPlugin):
# Needed as I can't get lxml to output opf:role and
# not output <opf:metadata> as well
raw = re.sub(br'(<[/]{0,1})opf:', br'\1', raw)
with lopen(href, 'wb') as f:
with open(href, 'wb') as f:
f.write(raw)
for item in oeb_book.manifest:
@@ -65,7 +65,7 @@ class OEBOutput(OutputFormatPlugin):
dir = os.path.dirname(path)
if not os.path.exists(dir):
os.makedirs(dir)
with lopen(path, 'wb') as f:
with open(path, 'wb') as f:
f.write(item.bytes_representation)
item.unload_data_from_memory(memory=path)