Skip to content

Commit

Permalink
testing doc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wolph committed Jun 7, 2016
1 parent e0f9bbe commit 8429c8d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,15 @@

# Monkey patch to disable nonlocal image warning
import sphinx
original_warn_mode = sphinx.environment.BuildEnvironment.warn_node
if hasattr(sphinx, 'environment'):
original_warn_mode = sphinx.environment.BuildEnvironment.warn_node

def allow_nonlocal_image_warn_node(self, msg, *args, **kwargs):
if not msg.startswith('nonlocal image URI found:'):
original_warn_mode(self, msg, *args, **kwargs)

def allow_nonlocal_image_warn_node(self, msg, *args, **kwargs):
if not msg.startswith('nonlocal image URI found:'):
original_warn_mode(self, msg, *args, **kwargs)

sphinx.environment.BuildEnvironment.warn_node = allow_nonlocal_image_warn_node
sphinx.environment.BuildEnvironment.warn_node = \
allow_nonlocal_image_warn_node

suppress_warnings = [
'image.nonlocal_uri',
Expand Down

0 comments on commit 8429c8d

Please sign in to comment.