diff options
| author | Georg Brandl <georg@python.org> | 2010-01-14 11:18:28 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-01-14 11:18:28 +0100 |
| commit | 9589493115cdd7d2fd3efa5d19600441c9472cc1 (patch) | |
| tree | 5a094b2105e50bd13cfcd0decde1104bfe41e6ae | |
| parent | 0403e0c5c144f170c35625c1b03d02b020eabf6d (diff) | |
| download | sphinx-9589493115cdd7d2fd3efa5d19600441c9472cc1.tar.gz | |
Fix docs of emit_firstresult().
| -rw-r--r-- | doc/ext/appapi.rst | 3 | ||||
| -rw-r--r-- | sphinx/application.py | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/doc/ext/appapi.rst b/doc/ext/appapi.rst index f3a4a061..77ced4ef 100644 --- a/doc/ext/appapi.rst +++ b/doc/ext/appapi.rst @@ -269,8 +269,7 @@ the following public API: .. method:: Sphinx.emit_firstresult(event, *arguments) Emit *event* and pass *arguments* to the callback functions. Return the - result of the first callback that doesn't return ``None`` (and don't call - the rest of the callbacks). + result of the first callback that doesn't return ``None``. .. versionadded:: 0.5 diff --git a/sphinx/application.py b/sphinx/application.py index 61c3b05a..758dd6ad 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -274,11 +274,11 @@ class Sphinx(object): event.pop(listener_id, None) def emit(self, event, *args): - result = [] + results = [] if event in self._listeners: for _, callback in self._listeners[event].iteritems(): - result.append(callback(self, *args)) - return result + results.append(callback(self, *args)) + return results def emit_firstresult(self, event, *args): for result in self.emit(event, *args): |
