Fix #3214: Allow to suppress "unknown mimetype" warnings from epub builder

This commit is contained in:
Takeshi KOMIYA 2016-12-11 00:42:57 +09:00
parent bd06ec2d9e
commit 6d900c34f1
3 changed files with 13 additions and 1 deletions

View File

@ -1,6 +1,12 @@
Release 1.5.1 (in development)
==============================
Features added
--------------
* #3214: Allow to suppress "unknown mimetype" warnings from epub builder using
:confval:`suppress_warnings`.
Bugs fixed
----------

View File

@ -233,6 +233,7 @@ General configuration
* ref.citation
* ref.doc
* misc.highlighting_failure
* epub.unknown_project_files
You can choose from these types.
@ -244,6 +245,10 @@ General configuration
Added ``misc.highlighting_failure``
.. versionchanged:: 1.5.1
Added ``epub.unknown_project_files``
.. confval:: needs_sphinx
If set to a ``major.minor`` version string like ``'1.1'``, Sphinx will

View File

@ -584,7 +584,8 @@ class EpubBuilder(StandaloneHTMLBuilder):
# we always have JS and potentially OpenSearch files, don't
# always warn about them
if ext not in ('.js', '.xml'):
self.warn('unknown mimetype for %s, ignoring' % filename)
self.warn('unknown mimetype for %s, ignoring' % filename,
type='epub', subtype='unknown_project_files')
continue
filename = filename.replace(os.sep, '/')
projectfiles.append(self.file_template % {