From a63a8069b1c6b19594df795191fd1969326053e3 Mon Sep 17 00:00:00 2001 From: Wojciech Zygmunt Porczyk Date: Mon, 5 May 2014 22:23:43 +0200 Subject: [PATCH] QubesVm: setter hook passes old value This is part of #827 bug. --- core-modules/000QubesVm.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index a0ea6190..937a360b 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -219,9 +219,9 @@ class QubesVm(object): attrs = hook(self, attrs) return attrs - def post_set_attr(self, attr, value): + def post_set_attr(self, attr, newvalue, oldvalue): for hook in self.hooks_set_attr: - hook(self, attr, value) + hook(self, attr, newvalue, oldvalue) def __basic_parse_xml_attr(self, value): if value is None: @@ -523,8 +523,9 @@ class QubesVm(object): @internal.setter def internal(self, value): + oldvalue = self._internal self._internal = value - self.post_set_attr('internal', value) + self.post_set_attr('internal', value, oldvalue) @property def autostart(self):