From 77a5e1ea23b6d6274dcbd000414bcd84f364d033 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 1 Jul 2020 00:14:11 +0100 Subject: [PATCH] Fix incorrect handler ordering when `before` keyword is used --- houdini/handlers/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/houdini/handlers/__init__.py b/houdini/handlers/__init__.py index 8fa0626..fd773e6 100644 --- a/houdini/handlers/__init__.py +++ b/houdini/handlers/__init__.py @@ -170,7 +170,7 @@ class _ListenerManager(_AbstractManager): if listener_object.before in self[listener_object.packet]: index_of_before = self[listener_object.packet].index(listener_object.before) old_index = self[listener_object.packet].index(listener_object) - self[listener_object.packet].insert(index_of_before - 1, self[listener_object.packet].pop(old_index)) + self[listener_object.packet].insert(index_of_before, self[listener_object.packet].pop(old_index)) if listener_object.after in self[listener_object.packet]: index_of_after = self[listener_object.packet].index(listener_object.after) old_index = self[listener_object.packet].index(listener_object)