diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-03-26 11:46:18 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-03-26 11:46:18 +0300 |
commit | 8a98a1ad3d153caa39b3fa5d953790f89cd18b83 (patch) | |
tree | 5cf23a250144cfcc48ff104679869bd900c35384 /sphinx/events.py | |
parent | 6d08efe2dd28ad3084f2e6fe056c8df7d876a019 (diff) |
Fix event handlers should be called back by installed order
Diffstat (limited to 'sphinx/events.py')
-rw-r--r-- | sphinx/events.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/events.py b/sphinx/events.py index c97478282..336e13bae 100644 --- a/sphinx/events.py +++ b/sphinx/events.py @@ -12,7 +12,7 @@ """ from __future__ import print_function -from collections import defaultdict +from collections import OrderedDict, defaultdict from six import itervalues @@ -47,7 +47,7 @@ class EventManager(object): def __init__(self): # type: () -> None self.events = core_events.copy() - self.listeners = defaultdict(dict) # type: Dict[unicode, Dict[int, Callable]] + self.listeners = defaultdict(OrderedDict) # type: Dict[unicode, Dict[int, Callable]] self.next_listener_id = 0 def add(self, name): |