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.
This commit is contained in:
Marek Marczykowski-Górecki 2016-08-09 02:58:14 +02:00
parent 5177f5e12b
commit 73d61bb378
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -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