WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xm: fix "xm labels type=any" command erro

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xm: fix "xm labels type=any" command error
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 09 Nov 2007 04:20:42 -0800
Delivery-date: Fri, 09 Nov 2007 04:24:27 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1194268556 0
# Node ID a609b4fc411d8f3b826ed3cebfd4369702f3c2fd
# Parent  ddc9e6b2babb18d357fb244c5620ac7c3ae3d50f
xm: fix "xm labels type=any" command error
Signed-off-by: Syunsuke HAYASHI <syunsuke@xxxxxxxxxxxxxx>
---
 tools/python/xen/xm/labels.py |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff -r ddc9e6b2babb -r a609b4fc411d tools/python/xen/xm/labels.py
--- a/tools/python/xen/xm/labels.py     Mon Nov 05 10:45:07 2007 +0000
+++ b/tools/python/xen/xm/labels.py     Mon Nov 05 13:15:56 2007 +0000
@@ -98,11 +98,8 @@ def labels_xapi(policy, ptype):
             names1 = acmpol.policy_get_virtualmachinelabel_names()
         if ptype == 'res' or ptype == 'any':
             names2 = acmpol.policy_get_resourcelabel_names()
-        if len(names1) > 0:
-            names = set(names1)
-            names.union(names2)
-        else:
-            names = set(names2)
+        names = list(set(names1).union(names2))
+        names.sort()
         for n in names:
             print n
     elif int(policystate['type']) == 0:

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xm: fix "xm labels type=any" command error, Xen patchbot-unstable <=