mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix object_to_unicode() not recursing over list items
This commit is contained in:
parent
ec1b079460
commit
a9aa87bf50
@ -69,7 +69,7 @@ def object_to_unicode(obj, enc=preferred_encoding):
|
||||
if isbytestring(obj):
|
||||
return dec(obj)
|
||||
if isinstance(obj, (list, tuple)):
|
||||
return [dec(x) if isbytestring(x) else x for x in obj]
|
||||
return [dec(x) if isbytestring(x) else object_to_unicode(x) for x in obj]
|
||||
if isinstance(obj, dict):
|
||||
ans = {}
|
||||
for k, v in obj.items():
|
||||
|
Loading…
x
Reference in New Issue
Block a user