dom0/qvm-block: fix error handling (#614)

This commit is contained in:
Marek Marczykowski 2012-06-30 00:58:06 +02:00
parent 8b2be6b693
commit ee3cf6b583

View File

@ -341,7 +341,7 @@ def block_attach(vm, backend_vm, device, frontend=None, mode="w", auto_detach=Fa
return
elif int(be_state) > 4:
# Error
error = xs.read('/local/domain/%d/error/backend/vbd/%d/%d/error' % (backend_vm.xid, vm.xid, block_name_to_devid(frontend)))
error = xs.read('', '/local/domain/%d/error/backend/vbd/%d/%d/error' % (backend_vm.xid, vm.xid, block_name_to_devid(frontend)))
if error is None:
raise QubesException("Error while connecting block device: " + error)
else: