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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user