logger.warning() supports node as location parameter

This commit is contained in:
Takeshi KOMIYA
2016-12-27 02:13:56 +09:00
parent e755a8c004
commit 15b46598e2
15 changed files with 77 additions and 84 deletions

View File

@@ -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':