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>
This commit is contained in:
Keir Fraser committed 2007-10-16 17:41:33 +01:00
1 parent c68c6c6b18
commit d61d5e12e1
1 file changed
+1 -1
+1 -1
View File
@@ -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: \
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.