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
+6
View File
@@ -1,6 +1,12 @@
Release 1.5.1 (in development) Release 1.5.1 (in development)
============================== ==============================
Features added
--------------
* #3214: Allow to suppress "unknown mimetype" warnings from epub builder using
:confval:`suppress_warnings`.
Bugs fixed Bugs fixed
---------- ----------
+5
View File
@@ -233,6 +233,7 @@ General configuration
* ref.citation * ref.citation
* ref.doc * ref.doc
* misc.highlighting_failure * misc.highlighting_failure
* epub.unknown_project_files
You can choose from these types. You can choose from these types.
@@ -244,6 +245,10 @@ General configuration
Added ``misc.highlighting_failure`` Added ``misc.highlighting_failure``
.. versionchanged:: 1.5.1
Added ``epub.unknown_project_files``
.. confval:: needs_sphinx .. confval:: needs_sphinx
If set to a ``major.minor`` version string like ``'1.1'``, Sphinx will If set to a ``major.minor`` version string like ``'1.1'``, Sphinx will
+2 -1
View File
@@ -584,7 +584,8 @@ class EpubBuilder(StandaloneHTMLBuilder):
# we always have JS and potentially OpenSearch files, don't # we always have JS and potentially OpenSearch files, don't
# always warn about them # always warn about them
if ext not in ('.js', '.xml'): 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 continue
filename = filename.replace(os.sep, '/') filename = filename.replace(os.sep, '/')
projectfiles.append(self.file_template % { projectfiles.append(self.file_template % {