WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xend: fix empty 'cpus' parsing

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: fix empty 'cpus' parsing
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 14 Dec 2009 01:45:24 -0800
Delivery-date: Mon, 14 Dec 2009 01:46:16 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1260777552 0
# Node ID 7088591b454bb6ed02d2f1ddd4947ced29e6ab4f
# Parent  73ff2d056e368e56cc85aa992de2bccc466ba92e
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@xxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py |    2 ++
 1 files changed, 2 insertions(+)

diff -r 73ff2d056e36 -r 7088591b454b tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Mon Dec 14 07:58:47 2009 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Mon Dec 14 07:59:12 2009 +0000
@@ -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('-')

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: fix empty 'cpus' parsing, Xen patchbot-unstable <=