From: Alastair Tse Date: Thu, 11 Jan 2007 17:03:11 +0000 (+0000) Subject: [XEND] Device update should handle SXP without 'device' as first X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15405^2~44 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b1567297790fd21968af033f9766f38c56f7d6a1;p=xen.git [XEND] Device update should handle SXP without 'device' as first param. Signed-off-by: Alastair Tse --- diff --git a/tools/python/xen/xend/XendConfig.py b/tools/python/xen/xend/XendConfig.py index cfd2c20e6e..b264b79f32 100644 --- a/tools/python/xen/xend/XendConfig.py +++ b/tools/python/xen/xend/XendConfig.py @@ -1020,10 +1020,11 @@ class XendConfig(dict): @return: Returns True if succesfully found and updated a device conf """ if dev_uuid in self['devices']: - config = sxp.child0(cfg_sxp) - dev_type = sxp.name(config) - dev_info = {} - + if sxp.child0(cfg_sxp) == 'device': + config = sxp.child0(cfg_sxp) + else: + config = cfg_sxp + for opt_val in config[1:]: try: opt, val = opt_val