From: Keir Fraser Date: Mon, 5 Nov 2007 13:15:56 +0000 (+0000) Subject: xm: fix "xm labels type=any" command error X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14809 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=bb768314f22a0b88c3e1e8837bdbf0dae70c3ede;p=xen.git xm: fix "xm labels type=any" command error Signed-off-by: Syunsuke HAYASHI --- 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: