This commit is contained in:
Kovid Goyal 2012-11-29 14:12:03 +05:30
parent bb5a88f66c
commit ca53c97024

View File

@ -21,8 +21,13 @@ class Clean(object):
'other.ms-thumbimage', 'thumbimagestandard'): 'other.ms-thumbimage', 'thumbimagestandard'):
if x in self.oeb.guide: if x in self.oeb.guide:
href = self.oeb.guide[x].href href = self.oeb.guide[x].href
item = self.oeb.manifest.hrefs[href] try:
covers.append([self.oeb.guide[x], len(item.data)]) item = self.oeb.manifest.hrefs[href]
except KeyError:
continue
else:
covers.append([self.oeb.guide[x], len(item.data)])
covers.sort(cmp=lambda x,y:cmp(x[1], y[1]), reverse=True) covers.sort(cmp=lambda x,y:cmp(x[1], y[1]), reverse=True)
if covers: if covers:
ref = covers[0][0] ref = covers[0][0]