ia64/xen-unstable

changeset 16318:a609b4fc411d

xm: fix "xm labels type=any" command error
Signed-off-by: Syunsuke HAYASHI <syunsuke@jp.fujitsu.com>
author Keir Fraser <keir@xensource.com>
date Mon Nov 05 13:15:56 2007 +0000 (2007-11-05)
parents ddc9e6b2babb
children dfe9c0c10a2c
files tools/python/xen/xm/labels.py
line diff
     1.1 --- a/tools/python/xen/xm/labels.py	Mon Nov 05 10:45:07 2007 +0000
     1.2 +++ b/tools/python/xen/xm/labels.py	Mon Nov 05 13:15:56 2007 +0000
     1.3 @@ -98,11 +98,8 @@ def labels_xapi(policy, ptype):
     1.4              names1 = acmpol.policy_get_virtualmachinelabel_names()
     1.5          if ptype == 'res' or ptype == 'any':
     1.6              names2 = acmpol.policy_get_resourcelabel_names()
     1.7 -        if len(names1) > 0:
     1.8 -            names = set(names1)
     1.9 -            names.union(names2)
    1.10 -        else:
    1.11 -            names = set(names2)
    1.12 +        names = list(set(names1).union(names2))
    1.13 +        names.sort()
    1.14          for n in names:
    1.15              print n
    1.16      elif int(policystate['type']) == 0: