From: Keir Fraser Date: Tue, 16 Oct 2007 16:41:33 +0000 (+0100) Subject: xend: xenapi: Suspended domain causes fault if vif.get_all_records() is called X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14847^2~35 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d61d5e12e118e714b1e31c84e754339cd71f19c4;p=xen.git xend: xenapi: Suspended domain causes fault if vif.get_all_records() is called A single suspended domain on the system causes a fault when vif.get_all_records() is called since this returns an ErrorDescription and no 'Value' in the 'v' dictionary. This patch now returns a 'None' as Value which might not be optimal but better than faulting. Signed-off-by: Stefan Berger --- diff --git a/tools/python/xen/xend/XendAPI.py b/tools/python/xen/xend/XendAPI.py index 9c119edb31..183ddcb502 100644 --- a/tools/python/xen/xend/XendAPI.py +++ b/tools/python/xen/xend/XendAPI.py @@ -555,7 +555,7 @@ class XendAPI(object): return xen_api_success(ref) def unpack(v): - return v['Value'] + return v.get('Value') def _get_all_records(_api_cls): return lambda s, session: \