[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xm: Fix string index out of range in 'vcpu-pin' command



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1270799665 -3600
# Node ID aae7cb2f18411492c720d3b60adaa979858a63df
# Parent  b44a4f9b9a62ab28074b31a68b0c53a2ec722955
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@xxxxxxxxxxxxxx>
---
 tools/python/xen/xm/main.py |    2 ++
 1 files changed, 2 insertions(+)

diff -r b44a4f9b9a62 -r aae7cb2f1841 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Fri Apr 09 08:53:53 2010 +0100
+++ b/tools/python/xen/xm/main.py       Fri Apr 09 08:54:25 2010 +0100
@@ -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):

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.