Have the sxp parsing cope when the cpus field is a list, which can happen

after a reboot.

From Daniele Palumbo <daniele@retaggio.net>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
Ewan Mellor committed 2007-01-25 10:34:17 +00:00
1 parent f3dac803d3
commit a5ae2bb063
1 file changed
+1 -1
+1 -1
View File
@@ -572,7 +572,7 @@ class XendConfig(dict):
# "0-3,^1" -> [0,2,3]
# "0-3,^1,1" -> [0,1,2,3]
try:
if 'cpus' in cfg:
if 'cpus' in cfg and type(cfg['cpus']) != list:
cpus = []
for c in cfg['cpus'].split(','):
if c.find('-') != -1:
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.