From abfe99756f51f478f2879eedf80d437edeeface7 Mon Sep 17 00:00:00 2001 From: Alexandre Bezroutchko Date: Mon, 8 Oct 2012 00:48:20 +0200 Subject: [PATCH] start XS transaction before getting the list of domains --- dom0/qvm-core/qubesutils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dom0/qvm-core/qubesutils.py b/dom0/qvm-core/qubesutils.py index 6a3a0313..8c015039 100644 --- a/dom0/qvm-core/qubesutils.py +++ b/dom0/qvm-core/qubesutils.py @@ -196,6 +196,8 @@ def block_list(vm = None, system_disks = False): desc_re = re.compile(r"^.{1,255}$") mode_re = re.compile(r"^[rw]$") + xs_trans = xs.transaction_start() + vm_list = [] if vm is not None: if not vm.is_running(): @@ -205,7 +207,6 @@ def block_list(vm = None, system_disks = False): else: vm_list = xs.ls('', '/local/domain') - xs_trans = xs.transaction_start() devices_list = {} for xid in vm_list: vm_name = xs.read(xs_trans, '/local/domain/%s/name' % xid)