From e9b998400d0d5626df04f5063960466467b3eb48 Mon Sep 17 00:00:00 2001 From: Wojtek Porczyk Date: Wed, 8 Jul 2015 11:32:41 +0200 Subject: [PATCH] qubes/vm/qubesvm: fix __init__ wrt .storage attr --- qubes/vm/qubesvm.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index fcfc17d4..ba08580c 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -455,12 +455,10 @@ class QubesVM(qubes.vm.BaseVM): self._libvirt_domain = None self._qdb_connection = None - if xml is not None: - return - - # else: we are creating new VM and attributes came through kwargs - assert self.qid < qubes.config.max_qid, "VM id out of bounds!" - assert self.name is not None + if xml is None: + # we are creating new VM and attributes came through kwargs + assert self.qid < qubes.config.max_qid, "VM id out of bounds!" + assert self.name is not None # Not in generic way to not create QubesHost() to frequently # XXX this doesn't apply, host is instantiated once