Skip to content

Commit

Permalink
Fix for #3037 (catch OError on detect epub layout)
Browse files Browse the repository at this point in the history
  • Loading branch information
OzzieIsaacs committed Apr 27, 2024
1 parent a305c35 commit e591211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cps/epub.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []

Expand Down

0 comments on commit e591211

Please sign in to comment.