mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
Correctly handle exception when no VM name returned by proxmox (#4508)
This commit is contained in:
parent
a8abb1a5bf
commit
8076f16aa9
2 changed files with 3 additions and 1 deletions
|
@ -1397,7 +1397,7 @@ def main():
|
|||
module.fail_json(msg='VM with name = %s does not exist in cluster' % name)
|
||||
vm = proxmox.get_vm(vmid)
|
||||
if not name:
|
||||
name = vm['name']
|
||||
name = vm.get('name', '(unnamed)')
|
||||
current = proxmox.proxmox_api.nodes(vm['node']).qemu(vmid).status.current.get()['status']
|
||||
status['status'] = current
|
||||
if status:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue