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

[Xen-devel] [PATCH] Fixing an unnatural error message of vcpu-list in main.py


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Yoshinori Katase" <y_katase@xxxxxxxxxxxxxxxx>
  • Date: Mon, 26 Dec 2005 14:17:03 +0900
  • Delivery-date: Mon, 26 Dec 2005 05:48:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcYJ25tlSG1iGd1WStKbvCzDxfLsEQ==

This patch fixes an unnatural error message of vcpu-list.

example:
# xm list
Name                              ID Mem(MiB) VCPUs State  Time(s)
Domain-0                           0      512     1 r-----  1064.6
test1                             13       64     1 r----- 83879.7

# xm list 1 13
Error: Domain '1' not found when running 'xm list'
# xm vcpu-list 1 13
Name                              ID  VCPU  CPU  State  Time(s)  CPU
Affinity
Error: Domain '1' not found when running 'xm vcpu-list'

Vcpu-list's error message shows an unnecessary header.

Signed-off-by: Yoshinori Katase <y_katase@xxxxxxxxxxxxxxxx>
Best Regards,
Yoshinori Katase


diff -r 829517be689f tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Fri Dec 23 15:42:46 2005
+++ b/tools/python/xen/xm/main.py       Mon Dec 26 14:03:13 2005
@@ -390,7 +390,6 @@


 def xm_vcpu_list(args):
-    print 'Name                              ID  VCPU  CPU  State  Time(s)
CPU Affinity'

     from xen.xend.XendClient import server
     if args:
@@ -400,6 +399,8 @@
         dominfo = map(
             lambda x: server.xend_domain_vcpuinfo(sxp.child_value(x,
'name')),
             doms)
+
+    print 'Name                              ID  VCPU  CPU  State  Time(s)
CPU Affinity'

     for dom in dominfo:
         def get_info(n):

Attachment: main_vcpu-list.patch
Description: Binary data

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

 


Rackspace

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