Fixed #1974: UnboundLocalError: local variable 'domain' referenced before assignment when using any role and sphinx.ext.intersphinx in same time.

This commit is contained in:
shimizukawa 2015-11-17 00:59:39 +09:00
parent df3643722f
commit f21a3039a0
2 changed files with 3 additions and 0 deletions

View File

@ -61,6 +61,8 @@ Bugs fixed
config value for 'version' and 'release'.
* #2102: On Windows + Py3, using ``|today|`` and non-ASCII date format will raise
UnicodeEncodeError.
* #1974: UnboundLocalError: local variable 'domain' referenced before assignment when
using `any` role and `sphinx.ext.intersphinx` in same time.
Release 1.3.1 (released Mar 17, 2015)
=====================================

View File

@ -228,6 +228,7 @@ def missing_reference(app, env, node, contnode):
objtypes = ['%s:%s' % (domain.name, objtype)
for domain in env.domains.values()
for objtype in domain.object_types]
domain = None
else:
domain = node.get('refdomain')
if not domain: