From 73d61bb3785ba746664e4abcf72dcb88e3bbd1fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 9 Aug 2016 02:58:14 +0200 Subject: [PATCH] qubes/events: fix event handlers ordering Since "qubes: fix event framework", handlers from extensions looks the same as from the VM class itself, so it isn't possible to order them correctly. Specification says: For each class first are called bound handlers (specified in class definition), then handlers from extensions. Aside from above, remaining order is undefined. So, restore this property, which is later correctly used to order handlers. --- qubes/events.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qubes/events.py b/qubes/events.py index cfc683a4..be7d1309 100644 --- a/qubes/events.py +++ b/qubes/events.py @@ -50,6 +50,8 @@ def handler(*events): def decorator(func): # pylint: disable=missing-docstring func.ha_events = events + # mark class own handler (i.e. not from extension) + func.ha_bound = True return func return decorator