From: Stefan Berger Subject: [PATCH] [XEND] [Xen-API] Suspended domain causes fault if vif.get_all_records() is called Date: Tue, 16 Oct 2007 12:28:23 -0400 Message-ID: <1192552103.1745.3.camel@gsal-3.watson.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-WVyUjer5bt8Io3YJe1gi" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org --=-WVyUjer5bt8Io3YJe1gi Content-Type: text/plain Content-Transfer-Encoding: 7bit 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 --=-WVyUjer5bt8Io3YJe1gi Content-Disposition: attachment; filename=xend_domain_suspend_bug_fix.diff Content-Type: text/x-patch; name=xend_domain_suspend_bug_fix.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: root/xen-unstable.hg/tools/python/xen/xend/XendAPI.py =================================================================== --- root.orig/xen-unstable.hg/tools/python/xen/xend/XendAPI.py +++ root/xen-unstable.hg/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: \ --=-WVyUjer5bt8Io3YJe1gi Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-WVyUjer5bt8Io3YJe1gi--