1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-20 21:21: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
+2 -2
View File
@@ -289,7 +289,7 @@ class MobiReader(object):
def write_as_utf8(path, data):
if isinstance(data, str):
data = data.encode('utf-8')
with lopen(path, 'wb') as f:
with open(path, 'wb') as f:
f.write(data)
parse_cache[htmlfile] = root
@@ -297,7 +297,7 @@ class MobiReader(object):
ncx = io.BytesIO()
opf, ncx_manifest_entry = self.create_opf(htmlfile, guide, root)
self.created_opf_path = os.path.splitext(htmlfile)[0] + '.opf'
opf.render(lopen(self.created_opf_path, 'wb'), ncx,
opf.render(open(self.created_opf_path, 'wb'), ncx,
ncx_manifest_entry=ncx_manifest_entry)
ncx = ncx.getvalue()
if ncx: