dom0/qvm-block: fix error handling (#614)
This commit is contained in:
parent
8b2be6b693
commit
ee3cf6b583
@ -341,7 +341,7 @@ def block_attach(vm, backend_vm, device, frontend=None, mode="w", auto_detach=Fa
|
|||||||
return
|
return
|
||||||
elif int(be_state) > 4:
|
elif int(be_state) > 4:
|
||||||
# Error
|
# 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:
|
if error is None:
|
||||||
raise QubesException("Error while connecting block device: " + error)
|
raise QubesException("Error while connecting block device: " + error)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user