From bb768314f22a0b88c3e1e8837bdbf0dae70c3ede Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 5 Nov 2007 13:15:56 +0000 Subject: [PATCH] xm: fix "xm labels type=any" command error Signed-off-by: Syunsuke HAYASHI --- tools/python/xen/xm/labels.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/python/xen/xm/labels.py b/tools/python/xen/xm/labels.py index bce0d22f7e..b8f676d70a 100644 --- a/tools/python/xen/xm/labels.py +++ b/tools/python/xen/xm/labels.py @@ -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: -- 2.30.2