# 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
|