mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
xm: fix "xm labels type=any" command error
Signed-off-by: Syunsuke HAYASHI <syunsuke@jp.fujitsu.com>
This commit is contained in:
1 parent
f7b2b7e319
commit
bb768314f2
1 file changed
+2
-5
@@ -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:
|
||||
|
||||