Skip to contentSkip to conversation

Fixing an unnatural error message of vcpu-list in main.py

PATCH Applied Yoshinori Katase 2 participants 2 messages Dec 26, 2005 – Jan 3, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fixing an unnatural error message of vcpu-list in main.py

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.

Best Regards,
Yoshinori Katase

tools/python/xen/xm/main.py Mon Dec 26 14:03:13 2005 renamed from tools/python/xen/xm/main.py Fri Dec 23 15:42:46 2005 +0 -1
diff -r 829517be689f tools/python/xen/xm/main.py
@@ -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):

tools/python/xen/xm/main.py +2 -1
diff -r 829517be689f tools/python/xen/xm/main.py
@@ -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):

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Applied
#1 lore raw
Quoted 15 lines · Yoshinori Katase

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'
Quoted 3 lines

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

Applied, thanks.

Ewan.