Std domain: don't expect "refprogram" attribute on an xref node.

This would lead to an exception if we pass in some generic x-ref node
that tries to resolve as an option.
This commit is contained in:
Georg Brandl 2014-09-19 10:35:43 +02:00
parent d2b955b7f9
commit c683bd7504

View File

@ -600,7 +600,7 @@ class StandardDomain(Domain):
return make_refnode(builder, fromdocname, docname, return make_refnode(builder, fromdocname, docname,
labelid, contnode) labelid, contnode)
elif typ == 'option': elif typ == 'option':
progname = node['refprogram'] progname = node.get('refprogram', '')
docname, labelid = self.data['progoptions'].get((progname, target), docname, labelid = self.data['progoptions'].get((progname, target),
('', '')) ('', ''))
if not docname: if not docname: