From ea9a984fa782f2a28d984900b7e41d09600301e3 Mon Sep 17 00:00:00 2001 From: Wojtek Porczyk Date: Wed, 1 Jul 2015 17:10:10 +0200 Subject: [PATCH] qubes/vm: Fix instantiating QubesVM vm.app attribute needs to be accessible before setting properties --- qubes/vm/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qubes/vm/__init__.py b/qubes/vm/__init__.py index d58a6fec..25614429 100644 --- a/qubes/vm/__init__.py +++ b/qubes/vm/__init__.py @@ -148,11 +148,14 @@ class BaseVM(qubes.PropertyHolder): def __init__(self, app, xml, services=None, devices=None, tags=None, **kwargs): # pylint: disable=redefined-outer-name - super(BaseVM, self).__init__(xml, **kwargs) + # self.app must be set before super().__init__, because some property + # setters need working .app attribute #: mother :py:class:`qubes.Qubes` object self.app = app + super(BaseVM, self).__init__(xml, **kwargs) + #: dictionary of services that are run on this domain self.services = services or {}