aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAlastair Tse <atse@xensource.com>2007-01-30 11:56:27 +0000
committerAlastair Tse <atse@xensource.com>2007-01-30 11:56:27 +0000
commit52c24132c30318ee5345be530bcba6e53c713bd8 (patch)
tree02a5ab593d7ecfd88810e24ee2414cc322ce2d68 /tools
parent9fd37a76223247cfb87c5220942f0c9e9e8390a0 (diff)
downloadxen-52c24132c30318ee5345be530bcba6e53c713bd8.tar.gz
xen-52c24132c30318ee5345be530bcba6e53c713bd8.tar.bz2
xen-52c24132c30318ee5345be530bcba6e53c713bd8.zip
[XEND] Fix bootable flag bypass in XendConfig
Signed-off-by: Alastair Tse <atse@xensource.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/python/xen/xend/XendConfig.py8
-rw-r--r--tools/python/xen/xend/server/XMLRPCServer.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/tools/python/xen/xend/XendConfig.py b/tools/python/xen/xend/XendConfig.py
index cc2655d60e..5a6555e9c7 100644
--- a/tools/python/xen/xend/XendConfig.py
+++ b/tools/python/xen/xend/XendConfig.py
@@ -881,10 +881,10 @@ class XendConfig(dict):
if sxp.name(config) in ('vbd', 'tap'):
# The bootable flag is never written to the
# store as part of the device config.
- uuid = sxp.child_value(sxpr, 'uuid')
- sxpr.append(
- 'bootable',
- self['devices'][dev_uuid]['bootable'])
+ dev_uuid = sxp.child_value(config, 'uuid')
+ dev_type, dev_cfg = self['devices'][dev_uuid]
+ config.append(['bootable',
+ int(dev_cfg['bootable'])])
sxpr.append(['device', config])
found = True
diff --git a/tools/python/xen/xend/server/XMLRPCServer.py b/tools/python/xen/xend/server/XMLRPCServer.py
index 722ccb4b2b..09a66549e9 100644
--- a/tools/python/xen/xend/server/XMLRPCServer.py
+++ b/tools/python/xen/xend/server/XMLRPCServer.py
@@ -34,7 +34,7 @@ from xen.xend.XendError import XendInvalidDomain
def fixup_sxpr(sexpr):
ret = []
for k in sexpr:
- if type(k) in (types.ListType, types.TupleType):
+ if type(k) in (list, tuple):
if len(k) != 2 or k[0] != 'vcpu_avail':
ret.append(fixup_sxpr(k))
else: