Skip to contentSkip to conversation

Suspended domain causes fault if vif.get_all_records() is called

PATCH New Stefan Berger 1 participant 1 message Oct 16, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

xen-unstable.hg/tools/python/xen/xend/XendAPI.py +1 -1
Index: 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: \

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel