From d4147c52bdb75713b9ddfca44331204ff84b2cb4 Mon Sep 17 00:00:00 2001 From: Wojtek Porczyk Date: Wed, 24 Jun 2015 15:36:09 +0200 Subject: [PATCH] qubes: Fix property-set events signature --- qubes/__init__.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/qubes/__init__.py b/qubes/__init__.py index 0fa12756..b5416bb7 100644 --- a/qubes/__init__.py +++ b/qubes/__init__.py @@ -645,18 +645,20 @@ class property(object): # pylint: disable=redefined-builtin,invalid-name value = self._type(value) if has_oldvalue: - instance.fire_event_pre( - 'property-pre-set:' + self.__name__, value, oldvalue) + instance.fire_event_pre('property-pre-set:' + self.__name__, + self.__name__, value, oldvalue) else: - instance.fire_event_pre('property-pre-set:' + self.__name__, value) + instance.fire_event_pre('property-pre-set:' + self.__name__, + self.__name__, value) instance._property_init(self, value) # pylint: disable=protected-access if has_oldvalue: - instance.fire_event( - 'property-set:' + self.__name__, value, oldvalue) + instance.fire_event('property-set:' + self.__name__, self.__name__, + value, oldvalue) else: - instance.fire_event('property-set:' + self.__name__, value) + instance.fire_event('property-set:' + self.__name__, self.__name__, + value) def __delete__(self, instance): @@ -668,17 +670,19 @@ class property(object): # pylint: disable=redefined-builtin,invalid-name if has_oldvalue: instance.fire_event_pre('property-pre-deleted:' + self.__name__, - oldvalue) + self.__name__, oldvalue) else: - instance.fire_event_pre('property-pre-deleted:' + self.__name__) + instance.fire_event_pre('property-pre-deleted:' + self.__name__, + self.__name__) delattr(instance, self._attr_name) if has_oldvalue: instance.fire_event('property-deleted:' + self.__name__, - oldvalue) + self.__name__, oldvalue) else: - instance.fire_event('property-deleted:' + self.__name__) + instance.fire_event('property-deleted:' + self.__name__, + self.__name__) def __repr__(self):