utils/block: catch an exception when talking to disconnected qubesdb

This can happen for example when domain disappeared in the meantime.
This commit is contained in:
Marek Marczykowski-Górecki 2015-03-26 22:10:49 +01:00
parent 96cd341162
commit c878beb25d

View File

@ -241,7 +241,12 @@ def block_list_vm(vm, system_disks = False):
devices_list = {} devices_list = {}
untrusted_devices = vm.qdb.multiread('/qubes-block-devices/') try:
untrusted_devices = vm.qdb.multiread('/qubes-block-devices/')
except DisconnectedError:
# FIXME: find some better way to do that
vm._qdb_connection = None
return {}
def get_dev_item(dev, item): def get_dev_item(dev, item):
return untrusted_devices.get( return untrusted_devices.get(