ia64/xen-unstable

changeset 16141:a38a2fdb4f1b

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 <stefanb@us.ibm.com>
author Keir Fraser <keir@xensource.com>
date Tue Oct 16 17:41:33 2007 +0100 (2007-10-16)
parents b6ff4859b3d4
children 786a210e7cab
files tools/python/xen/xend/XendAPI.py
line diff
     1.1 --- a/tools/python/xen/xend/XendAPI.py	Tue Oct 16 17:40:22 2007 +0100
     1.2 +++ b/tools/python/xen/xend/XendAPI.py	Tue Oct 16 17:41:33 2007 +0100
     1.3 @@ -555,7 +555,7 @@ class XendAPI(object):
     1.4                  return xen_api_success(ref)
     1.5  
     1.6              def unpack(v):
     1.7 -                return v['Value']
     1.8 +                return v.get('Value')
     1.9  
    1.10              def _get_all_records(_api_cls):
    1.11                  return lambda s, session: \