aerkalov/ebooklib

Option ignore_ncx (warning)

carlosalvidrez opened this issue · 4 comments

Getting this warning:

ebooklib/epub.py:1395: UserWarning: In the future version we will turn default option ignore_ncx to True. warnings.warn('In the future version we will turn default option ignore_ncx to True.')

.. and the only way to silence it is to set it True like this: epub.read_epub(filename, {"ignore_ncx": True})

I think that the intention was to explicitly select whether you want it or not, and not use the default, which is False.
But, as I said it forces you to select True, otherwise you got a warning that looks really bad in a CLI.

This is because in the code, there is an
if not self.options.get('ignore_ncx'):
where it should be
if self.options.get('ignore_ncx') is None: