Suppress image warning.

This commit is contained in:
Rowan Cockett
2016-05-29 19:22:15 -07:00
parent 18f98b2ecd
commit 231e6dbc93
3 changed files with 10 additions and 17 deletions
-1
View File
@@ -1 +0,0 @@
from environmentSetup import supress_nonlocal_image_warn
-15
View File
@@ -1,15 +0,0 @@
def supress_nonlocal_image_warn():
import sphinx.environment
sphinx.environment.BuildEnvironment.warn_node = _supress_nonlocal_image_warn
def _supress_nonlocal_image_warn(self, msg, node):
from docutils.utils import get_source_line
if not msg.startswith('nonlocal image URI found:'):
self._warnfunc(msg, '%s:%s' % get_source_line(node))
if __name__ == '__main__':
checkDependencies()
+10 -1
View File
@@ -258,5 +258,14 @@ texinfo_documents = [
autodoc_member_order = 'bysource'
from _ext import supress_nonlocal_image_warn
def supress_nonlocal_image_warn():
import sphinx.environment
sphinx.environment.BuildEnvironment.warn_node = _supress_nonlocal_image_warn
def _supress_nonlocal_image_warn(self, msg, node):
from docutils.utils import get_source_line
if not msg.startswith('nonlocal image URI found:'):
self._warnfunc(msg, '%s:%s' % get_source_line(node))
supress_nonlocal_image_warn()