check if template key exists
This commit is contained in:
parent
9518f65c05
commit
26c6ca6bc8
@ -190,7 +190,7 @@ def getvms():
|
|||||||
vms = []
|
vms = []
|
||||||
try:
|
try:
|
||||||
for vm in G.proxmox.cluster.resources.get(type='vm'):
|
for vm in G.proxmox.cluster.resources.get(type='vm'):
|
||||||
if vm['template']:
|
if 'template' in vm and vm['template']:
|
||||||
continue
|
continue
|
||||||
if G.guest_type == 'both':
|
if G.guest_type == 'both':
|
||||||
vms.append(vm)
|
vms.append(vm)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user