summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc/directive.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-03-01 02:18:35 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-03-03 02:35:28 +0900
commitadc8c8019051e07b93ab25c8f73485f6e76f0d16 (patch)
tree63bfa5600e85cdef072e6e69679b7eff9aba82b9 /sphinx/ext/autodoc/directive.py
parent3efadc63cc984d10c88367a86878037587cc5cd6 (diff)
downloadsphinx-git-adc8c8019051e07b93ab25c8f73485f6e76f0d16.tar.gz
Fix autodoc: crashed when invalid options given
Diffstat (limited to 'sphinx/ext/autodoc/directive.py')
-rw-r--r--sphinx/ext/autodoc/directive.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/ext/autodoc/directive.py b/sphinx/ext/autodoc/directive.py
index f050b2ac4..0e19516ad 100644
--- a/sphinx/ext/autodoc/directive.py
+++ b/sphinx/ext/autodoc/directive.py
@@ -58,7 +58,7 @@ class DocumenterBridge(object):
def warn(self, msg):
# type: (unicode) -> None
- logger.warning(msg, line=self.lineno)
+ logger.warning(msg, location=(self.env.docname, self.lineno))
def process_documenter_options(documenter, config, options):
@@ -125,7 +125,7 @@ class AutodocDirective(Directive):
except (KeyError, ValueError, TypeError) as exc:
# an option is either unknown or has a wrong type
logger.error('An option to %s is either unknown or has an invalid value: %s' %
- (self.name, exc), line=lineno)
+ (self.name, exc), location=(source, lineno))
return []
# generate the output