From 94197b33a2cad41ed9c2bad3df9f96c1a14b8587 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 9 Feb 2020 10:14:14 +0000 Subject: insert new hooks at the start of their priority, to prevent duplicates on reload --- src/EventManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/EventManager.py') diff --git a/src/EventManager.py b/src/EventManager.py index f10ebcd4..cef82f26 100644 --- a/src/EventManager.py +++ b/src/EventManager.py @@ -165,7 +165,7 @@ class EventRoot(object): hook_array.insert(i, new_hook) break if not hooked: - hook_array.append(new_hook) + hook_array.insert(0, new_hook) return new_hook def _call(self, path: typing.List[str], kwargs: dict, safe: bool, -- cgit v1.3.1-10-gc9f91