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

[Xen-changelog] Fix xm info handling of empty strings (fix bugzilla bug #216)



# HG changeset patch
# User shand@xxxxxxxxxxxxxxxxxxxxxxxxxxx
# Node ID 5c49ed1145ccd3ec28f51a5f0f4cb33736852a63
# Parent  41a74438bcba3d1c0649cc202b30777a60a168e1
Fix xm info handling of empty strings (fix bugzilla bug #216) 

Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx>

diff -r 41a74438bcba -r 5c49ed1145cc tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Fri Sep  9 18:36:48 2005
+++ b/tools/python/xen/xm/main.py       Fri Sep  9 23:11:18 2005
@@ -450,7 +450,10 @@
     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):

_______________________________________________
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®.