mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
xend: fix empty 'cpus' parsing
/etc/xen/xmexample.hvm says "" means "leave to Xen to pick", but we get a "Error: string index out of range" currently. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
This commit is contained in:
1 parent
51dfdb01ad
commit
a4a7c638f7
1 file changed
+2
@@ -577,6 +577,8 @@ class XendConfig(dict):
|
||||
# "0-3,^1" -> [0,2,3]
|
||||
# "0-3,^1,1" -> [0,1,2,3]
|
||||
l = []
|
||||
if s == "":
|
||||
return l
|
||||
for c in s.split(','):
|
||||
if c.find('-') != -1:
|
||||
(x, y) = c.split('-')
|
||||
|
||||