diff options
Diffstat (limited to 'sphinx/domains/python.py')
-rw-r--r-- | sphinx/domains/python.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index 1da874ea2..886b1f863 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -787,10 +787,9 @@ class PythonDomain(Domain): if not matches: return None elif len(matches) > 1: - logger.warn_node( - 'more than one target found for cross-reference ' - '%r: %s' % (target, ', '.join(match[0] for match in matches)), - node) + logger.warning('more than one target found for cross-reference %r: %s', + target, ', '.join(match[0] for match in matches), + location=node) name, obj = matches[0] if obj[1] == 'module': |