# HG changeset patch # User shand@ubuntu.eng.hq.xensource.com # Date 1126307478 28800 # Node ID 5c49ed1145ccd3ec28f51a5f0f4cb33736852a63 # Parent 41a74438bcba3d1c0649cc202b30777a60a168e1 Fix xm info handling of empty strings (fix bugzilla bug #216) Signed-off-by: Steven Hand diff -r 41a74438bcba -r 5c49ed1145cc tools/python/xen/xm/main.py --- a/tools/python/xen/xm/main.py Fri Sep 09 10:36:48 2005 -0800 +++ b/tools/python/xen/xm/main.py Fri Sep 09 15:11:18 2005 -0800 @@ -450,7 +450,10 @@ def xm_info(args): info = server.xend_node() for x in info[1:]: - print "%-23s:" % x[0], x[1] + if len(x) < 2: + print "%-23s: (none)" % x[0] + else: + print "%-23s:" % x[0], x[1] # TODO: remove as soon as console server shows up def xm_console(args):