mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-03-29 08:03:31 +02:00
Removed polyglots unicode_type usage
This commit is contained in:
@@ -5,7 +5,6 @@ import re, os, shutil, numbers
|
||||
|
||||
from ebook_converter import CurrentDir
|
||||
from ebook_converter.customize import Plugin
|
||||
from ebook_converter.polyglot.builtins import unicode_type
|
||||
|
||||
|
||||
class ConversionOption(object):
|
||||
@@ -79,7 +78,7 @@ class OptionRecommendation(object):
|
||||
self.option.choices:
|
||||
raise ValueError('OpRec: %s: Recommended value not in choices'%
|
||||
self.option.name)
|
||||
if not (isinstance(self.recommended_value, (numbers.Number, bytes, unicode_type)) or self.recommended_value is None):
|
||||
if not (isinstance(self.recommended_value, (numbers.Number, bytes, str)) or self.recommended_value is None):
|
||||
raise ValueError('OpRec: %s:'%self.option.name + repr(
|
||||
self.recommended_value) + ' is not a string or a number')
|
||||
|
||||
@@ -298,7 +297,7 @@ class OutputFormatPlugin(Plugin):
|
||||
@property
|
||||
def is_periodical(self):
|
||||
return self.oeb.metadata.publication_type and \
|
||||
unicode_type(self.oeb.metadata.publication_type[0]).startswith('periodical:')
|
||||
str(self.oeb.metadata.publication_type[0]).startswith('periodical:')
|
||||
|
||||
def specialize_options(self, log, opts, input_fmt):
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user