From: Ewan Mellor Date: Thu, 28 Dec 2006 15:26:45 +0000 (+0000) Subject: Cope if a VIF is not attached to a network. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15422^2~138 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9d26922025825482767c310d7d881edc58f256d0;p=xen.git Cope if a VIF is not attached to a network. Signed-off-by: Ewan Mellor --- diff --git a/tools/python/xen/xend/XendNetwork.py b/tools/python/xen/xend/XendNetwork.py index be0d5cedd5..5e606957f1 100644 --- a/tools/python/xen/xend/XendNetwork.py +++ b/tools/python/xen/xend/XendNetwork.py @@ -90,7 +90,7 @@ class XendNetwork: vifs = vm.get_vifs() for vif in vifs: vif_cfg = vm.get_dev_xenapi_config('vif', vif) - if vif_cfg['network'] == self.uuid: + if vif_cfg.get('network') == self.uuid: result.append(vif) return result