diff --git a/src/calibre/ebooks/epub/input.py b/src/calibre/ebooks/epub/input.py index 48699521c7..0f94fb674a 100644 --- a/src/calibre/ebooks/epub/input.py +++ b/src/calibre/ebooks/epub/input.py @@ -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]