debuggers.hg
changeset 21172:aae7cb2f1841
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>
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>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Fri Apr 09 08:54:25 2010 +0100 (2010-04-09) |
parents | b44a4f9b9a62 |
children | 5bc70100b514 |
files | tools/python/xen/xm/main.py |
line diff
1.1 --- a/tools/python/xen/xm/main.py Fri Apr 09 08:53:53 2010 +0100 1.2 +++ b/tools/python/xen/xm/main.py Fri Apr 09 08:54:25 2010 +0100 1.3 @@ -1458,6 +1458,8 @@ def xm_vcpu_pin(args): 1.4 def cpu_make_map(cpulist): 1.5 cpus = [] 1.6 for c in cpulist.split(','): 1.7 + if c == '': 1.8 + continue 1.9 if c.find('-') != -1: 1.10 (x,y) = c.split('-') 1.11 for i in range(int(x),int(y)+1):