Fix for #3037 (catch OError on detect epub layout)

This commit is contained in:
Ozzie Isaacs 2024-04-27 07:22:58 +02:00
parent a305c35de4
commit e591211b57
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ def get_epub_layout(book, book_data):
p = tree.xpath('/pkg:package/pkg:metadata', namespaces=default_ns)[0]
layout = p.xpath('pkg:meta[@property="rendition:layout"]/text()', namespaces=default_ns)
except (etree.XMLSyntaxError, KeyError, IndexError) as e:
except (etree.XMLSyntaxError, KeyError, IndexError, OSError) as e:
log.error("Could not parse epub metadata of book {} during kobo sync: {}".format(book.id, e))
layout = []