The write_epub function, which is visibly the main function to create a EPUB file and which is used in the main example for the package, swallows IOError.
This seems dangerous, or at the very least strange, since the caller for such a function would expect to be notified of such an error, and generally swallowing exceptions is a bad practice. Right now the function fails silently.
Very good point. This is just wrong. When it comes to exceptions probably the whole system when it comes to read/write should be overlooked and more custom exceptions should be introduced.
The write_epub function, which is visibly the main function to create a EPUB file and which is used in the main example for the package, swallows IOError.
https://github.com/aerkalov/ebooklib/blob/d4febc04468ed682bf300ec927411b2faadc17ab/ebooklib/epub.py#L1745-L1748
This seems dangerous, or at the very least strange, since the caller for such a function would expect to be notified of such an error, and generally swallowing exceptions is a bad practice. Right now the function fails silently.