summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-09-19 10:35:43 +0200
committerGeorg Brandl <georg@python.org>2014-09-19 10:35:43 +0200
commitad4000639c5b7af3dba7d46f61d73a5b7671a712 (patch)
tree9f6d8eb4dd01c09813aa66eb68699c635cfbc27b
parentae5618e56edafcd859df7c20a424f93ecfb50180 (diff)
downloadsphinx-ad4000639c5b7af3dba7d46f61d73a5b7671a712.tar.gz
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.
-rw-r--r--sphinx/domains/std.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/domains/std.py b/sphinx/domains/std.py
index 43341e42..9a7937aa 100644
--- a/sphinx/domains/std.py
+++ b/sphinx/domains/std.py
@@ -600,7 +600,7 @@ class StandardDomain(Domain):
return make_refnode(builder, fromdocname, docname,
labelid, contnode)
elif typ == 'option':
- progname = node['refprogram']
+ progname = node.get('refprogram', '')
docname, labelid = self.data['progoptions'].get((progname, target),
('', ''))
if not docname: