dom0/core: do not leak xs transaction and use it in all xs calls
This commit is contained in:
parent
f4ef1adcdd
commit
081cfab559
@ -201,11 +201,12 @@ def block_list(vm = None, system_disks = False):
|
|||||||
vm_list = []
|
vm_list = []
|
||||||
if vm is not None:
|
if vm is not None:
|
||||||
if not vm.is_running():
|
if not vm.is_running():
|
||||||
|
xs.transaction_end(xs_trans)
|
||||||
return []
|
return []
|
||||||
else:
|
else:
|
||||||
vm_list = [ str(vm.xid) ]
|
vm_list = [ str(vm.xid) ]
|
||||||
else:
|
else:
|
||||||
vm_list = xs.ls('', '/local/domain')
|
vm_list = xs.ls(xs_trans, '/local/domain')
|
||||||
|
|
||||||
devices_list = {}
|
devices_list = {}
|
||||||
for xid in vm_list:
|
for xid in vm_list:
|
||||||
|
Loading…
Reference in New Issue
Block a user