mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
xm: Fix string index out of range in 'vcpu-pin' command
if <PCPUs> contins '' (e.g. '1,,2'), error 'string index out of range' occurs. Fix this trivial bug. Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com> xen-unstable changeset: 21126:aae7cb2f1841 xen-unstable date: Fri Apr 09 08:54:25 2010 +0100
This commit is contained in:
1 parent
aadf7e0c37
commit
dc5a2ae231
1 file changed
+2
@@ -1458,6 +1458,8 @@ def xm_vcpu_pin(args):
|
||||
def cpu_make_map(cpulist):
|
||||
cpus = []
|
||||
for c in cpulist.split(','):
|
||||
if c == '':
|
||||
continue
|
||||
if c.find('-') != -1:
|
||||
(x,y) = c.split('-')
|
||||
for i in range(int(x),int(y)+1):
|
||||
|
||||