mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-04-20 13:11:27 +02:00
Removed polyglots unicode_type usage
This commit is contained in:
@@ -16,7 +16,7 @@ from ebook_converter.ebooks.metadata.toc import TOC
|
||||
from ebook_converter.ebooks.mobi.reader.headers import BookHeader
|
||||
from ebook_converter.utils.img import save_cover_data_to, gif_data_to_png_data, AnimatedGIF
|
||||
from ebook_converter.utils.imghdr import what
|
||||
from ebook_converter.polyglot.builtins import iteritems, unicode_type
|
||||
from ebook_converter.polyglot.builtins import iteritems
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
@@ -287,7 +287,7 @@ class MobiReader(object):
|
||||
pass
|
||||
|
||||
def write_as_utf8(path, data):
|
||||
if isinstance(data, unicode_type):
|
||||
if isinstance(data, str):
|
||||
data = data.encode('utf-8')
|
||||
with lopen(path, 'wb') as f:
|
||||
f.write(data)
|
||||
|
||||
Reference in New Issue
Block a user