dom0/core: do not leak xs transaction and use it in all xs calls

This commit is contained in:
Marek Marczykowski 2012-10-08 01:26:07 +02:00
parent f4ef1adcdd
commit 081cfab559

View File

@ -201,11 +201,12 @@ def block_list(vm = None, system_disks = False):
vm_list = []
if vm is not None:
if not vm.is_running():
xs.transaction_end(xs_trans)
return []
else:
vm_list = [ str(vm.xid) ]
else:
vm_list = xs.ls('', '/local/domain')
vm_list = xs.ls(xs_trans, '/local/domain')
devices_list = {}
for xid in vm_list: