[XEND] Device update should handle SXP without 'device' as first

param.

Signed-off-by: Alastair Tse <atse@xensource.com>
This commit is contained in:
Alastair Tse committed 2007-01-11 17:03:11 +00:00
1 parent 85bc6f4326
commit b156729779
1 file changed
+5 -4
+5 -4
View File
@@ -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
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.