aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2020-02-13 23:56:04 +0000
committerGravatar jesopo2020-02-13 23:56:04 +0000
commitfc8e0f718c5190a6d096c185210a6de0e534520b (patch)
tree1582cce49339b6b1daaeeeaed926a6deb5324883
parentreplace lxml usage with html5lib! the future is cool (diff)
signature
another rework of event priorities. insert as >=, not as default
-rw-r--r--src/EventManager.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/EventManager.py b/src/EventManager.py
index cef82f26..020eeaa6 100644
--- a/src/EventManager.py
+++ b/src/EventManager.py
@@ -160,12 +160,12 @@ class EventRoot(object):
hooked = False
for i, other_hook in enumerate(hook_array):
- if other_hook.priority > new_hook.priority:
+ if other_hook.priority >= new_hook.priority:
hooked = True
hook_array.insert(i, new_hook)
break
if not hooked:
- hook_array.insert(0, new_hook)
+ hook_array.append(new_hook)
return new_hook
def _call(self, path: typing.List[str], kwargs: dict, safe: bool,