1
0
Fork 0
alistair23-linux/Documentation/sphinx
Mauro Carvalho Chehab 454f96f2b7 docs: automarkup.py: ignore exceptions when seeking for xrefs
When using the automarkup extension with:
	make pdfdocs

without passing an specific book, the code will raise an exception:

	  File "/devel/v4l/docs/Documentation/sphinx/automarkup.py", line 86, in auto_markup
	    node.parent.replace(node, markup_funcs(name, app, node))
	  File "/devel/v4l/docs/Documentation/sphinx/automarkup.py", line 59, in markup_funcs
	    'function', target, pxref, lit_text)
	  File "/devel/v4l/docs/sphinx_2.0/lib/python3.7/site-packages/sphinx/domains/c.py", line 308, in resolve_xref
	    contnode, target)
	  File "/devel/v4l/docs/sphinx_2.0/lib/python3.7/site-packages/sphinx/util/nodes.py", line 450, in make_refnode
	    '#' + targetid)
	  File "/devel/v4l/docs/sphinx_2.0/lib/python3.7/site-packages/sphinx/builders/latex/__init__.py", line 159, in get_relative_uri
	    return self.get_target_uri(to, typ)
	  File "/devel/v4l/docs/sphinx_2.0/lib/python3.7/site-packages/sphinx/builders/latex/__init__.py", line 152, in get_target_uri
	    raise NoUri
	sphinx.environment.NoUri

This happens because not all references will belong to a single
PDF/LaTeX document.

Better to just ignore those than breaking Sphinx build.

Fixes: d74b0d31dd ("Docs: An initial automarkup extension for sphinx")
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
[jc: Narrowed the "except" and tweaked the comment]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2019-07-08 14:35:47 -06:00
..
automarkup.py docs: automarkup.py: ignore exceptions when seeking for xrefs 2019-07-08 14:35:47 -06:00
cdomain.py docs: cdomain.py: get rid of a warning since version 1.8 2019-05-29 15:47:32 -06:00
kernel_include.py docs: sphinx-extensions: add metadata parallel-safe 2016-09-01 08:19:02 -06:00
kerneldoc.py doc: Cope with the deprecation of AutoReporter 2019-05-23 09:23:11 -06:00
kernellog.py doc: Cope with Sphinx logging deprecations 2019-05-23 09:22:00 -06:00
kfigure.py doc: Cope with Sphinx logging deprecations 2019-05-23 09:22:00 -06:00
load_config.py doc-rst: generic way to build only sphinx sub-folders 2016-08-14 11:51:51 -06:00
parse-headers.pl doc:sphinx: fix parse-header description 2018-06-26 09:07:57 -06:00
requirements.txt docs: requirements.txt: recommend Sphinx 1.7.9 2019-05-30 10:42:05 -06:00
rstFlatTable.py Documentation: rstFlatTable.py: fix a broken reference 2018-06-15 18:10:01 -03:00