mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-05 07:49:10 -07:00
Securize the index based lookup of dict.keys() (#54452)
This commit is contained in:
parent
4a5b9bd8eb
commit
cf2f13e05d
4 changed files with 4 additions and 4 deletions
|
@ -114,7 +114,7 @@ class VMwareConfigurationBackup(PyVmomi):
|
|||
self.module.fail_json(msg="Failed to find ESXi %s" % self.esxi_hostname)
|
||||
|
||||
host_system = get_all_objs(self.content, [vim.HostSystem])
|
||||
return host_system.keys()[0]
|
||||
return list(host_system)[0]
|
||||
|
||||
def process_state(self):
|
||||
if self.state == 'saved':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue