qubes/vm: Fix instantiating QubesVM

vm.app attribute needs to be accessible before setting properties
This commit is contained in:
Wojtek Porczyk 2015-07-01 17:10:10 +02:00
parent cb62545007
commit ea9a984fa7

View File

@ -148,11 +148,14 @@ class BaseVM(qubes.PropertyHolder):
def __init__(self, app, xml, services=None, devices=None, tags=None, def __init__(self, app, xml, services=None, devices=None, tags=None,
**kwargs): **kwargs):
# pylint: disable=redefined-outer-name # 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 #: mother :py:class:`qubes.Qubes` object
self.app = app self.app = app
super(BaseVM, self).__init__(xml, **kwargs)
#: dictionary of services that are run on this domain #: dictionary of services that are run on this domain
self.services = services or {} self.services = services or {}