EPUB Input: Fix typo that caused incorrect processing of EPUB files with more than one identifier element and encrypted fonts

This commit is contained in:
Kovid Goyal 2010-05-15 10:14:29 -06:00
parent b7421bc3ca
commit de305d2d95

View File

@ -32,9 +32,9 @@ class EPUBInput(InputFormatPlugin):
key = None
for item in opf.identifier_iter():
scheme = None
for key in item.attrib.keys():
if key.endswith('scheme'):
scheme = item.get(key)
for xkey in item.attrib.keys():
if xkey.endswith('scheme'):
scheme = item.get(xkey)
if (scheme and scheme.lower() == 'uuid') or \
(item.text and item.text.startswith('urn:uuid:')):
key = str(item.text).rpartition(':')[-1]