1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-19 12:43: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

@@ -40,7 +40,7 @@ class PMLOutput(OutputFormatPlugin):
with TemporaryDirectory('_pmlz_output') as tdir:
pmlmlizer = PMLMLizer(log)
pml = str(pmlmlizer.extract_content(oeb_book, opts))
with lopen(os.path.join(tdir, 'index.pml'), 'wb') as out:
with open(os.path.join(tdir, 'index.pml'), 'wb') as out:
out.write(pml.encode(opts.pml_output_encoding, 'replace'))
img_path = os.path.join(tdir, 'index_img')
@@ -70,5 +70,5 @@ class PMLOutput(OutputFormatPlugin):
path = os.path.join(out_dir, image_hrefs[item.href])
with lopen(path, 'wb') as out:
with open(path, 'wb') as out:
out.write(data)