summaryrefslogtreecommitdiff
path: root/sphinx/environment.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-10-22 11:16:48 +0200
committerGeorg Brandl <georg@python.org>2010-10-22 11:16:48 +0200
commitdb8189083d6022a34b331d4c482776ba301eae1b (patch)
tree4772befc0e005a3cd7f7377d6c5777a8f24ec43b /sphinx/environment.py
parent92f6212c98871ddba777524039d8b1950a069c53 (diff)
parent357f8472c7f8b7772d27c561215bc8f981f13001 (diff)
downloadsphinx-git-db8189083d6022a34b331d4c482776ba301eae1b.tar.gz
merge with 1.0
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."""