mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-25 20:45:58 +01:00
python3: do not use types.*Type which is an alias for str
Just compare to (str, unicode_type) directly, and handle the related python3 reclassification.
This commit is contained in:
parent
24f504f16b
commit
a75b0730a7
1 changed files with 2 additions and 3 deletions
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
import re, codecs, os, numbers
|
||||
from collections import namedtuple
|
||||
from types import StringType, UnicodeType
|
||||
|
||||
from calibre import (strftime)
|
||||
from calibre.customize import CatalogPlugin
|
||||
|
|
@ -15,7 +14,7 @@
|
|||
from calibre.customize.conversion import DummyReporter
|
||||
from calibre.constants import preferred_encoding
|
||||
from calibre.ebooks.metadata import format_isbn
|
||||
from polyglot.builtins import string_or_bytes
|
||||
from polyglot.builtins import string_or_bytes, unicode_type
|
||||
|
||||
|
||||
class BIBTEX(CatalogPlugin):
|
||||
|
|
@ -351,7 +350,7 @@ def tpl_replace(objtplname) :
|
|||
bibtexc.ascii_bibtex = True
|
||||
|
||||
# Check citation choice and go to default in case of bad CLI
|
||||
if isinstance(opts.impcit, (StringType, UnicodeType)) :
|
||||
if isinstance(opts.impcit, (str, unicode_type)) :
|
||||
if opts.impcit == 'False' :
|
||||
citation_bibtex= False
|
||||
elif opts.impcit == 'True' :
|
||||
|
|
|
|||
Loading…
Reference in a new issue