Extended exception coverage

This commit is contained in:
th3r00t
2021-07-24 13:51:10 -04:00
parent 8405fbed19
commit d263c14040

View File

@@ -281,8 +281,8 @@ class Catalogue:
"""
Opens epub as zip file filters then stores as list any files matching cover_regx
"""
cover = book_zip.open(list(filter(self.cover_regx.search, book["files"]))[0])
try:
cover = book_zip.open(list(filter(self.cover_regx.search, book["files"]))[0])
cover = book_zip.read(cover.name)
return cover
except Error as e: