summaryrefslogtreecommitdiff
path: root/sphinx/environment.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/environment.py')
-rw-r--r--sphinx/environment.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/sphinx/environment.py b/sphinx/environment.py
index 883c91e99..85d43fcbf 100644
--- a/sphinx/environment.py
+++ b/sphinx/environment.py
@@ -377,12 +377,8 @@ class BuildEnvironment:
self.settings['warning_stream'] = WarningStream(func)
def warn(self, docname, msg, lineno=None):
- if docname:
- if lineno is None:
- lineno = ''
- self._warnfunc(msg, '%s:%s' % (self.doc2path(docname), lineno))
- else:
- self._warnfunc(msg)
+ # strange argument order is due to backwards compatibility
+ self._warnfunc(msg, (docname, lineno))
def clear_doc(self, docname):
"""Remove all traces of a source file in the inventory."""