1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-25 16:01:29 +02:00

Removing couple of "buildins" polyglot types

This commit is contained in:
2020-04-20 20:22:50 +02:00
parent eac0b98d6f
commit c867f0321b
36 changed files with 85 additions and 109 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ from ebook_converter.ebooks.metadata.book.base import Metadata
from ebook_converter.ebooks.metadata.opf2 import dump_dict
from ebook_converter.utils.date import parse_date, isoformat, now
from ebook_converter.utils.localization import canonicalize_lang, lang_as_iso639_1
from ebook_converter.polyglot.builtins import iteritems, string_or_bytes
from ebook_converter.polyglot.builtins import iteritems
__license__ = 'GPL v3'
@@ -477,7 +477,7 @@ def metadata_to_xmp_packet(mi):
'authors':('dc:creator', True), 'tags':('dc:subject', False), 'publisher':('dc:publisher', False),
}):
val = mi.get(prop) or ()
if isinstance(val, string_or_bytes):
if isinstance(val, (str, bytes)):
val = [val]
create_sequence_property(dc, tag, val, ordered)
if not mi.is_null('pubdate'):