You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/plugins/inventory
Evan Wies 0c9c4ae401 digital_ocean #3438: use get instead of [] to prevent KeyError
The existing code was using:
  a[b][c[d]]
where a[b] would always exist and c[d] would always exist.
But the nested index would not alway exist, particularly when a DigitalOcean item disapeared.

This changes that nested index to a `get` and properly handles None results.

This bug was present in two spots in this file.
11 years ago
..
cobbler.py Merge plugins tree 12 years ago
digital_ocean.ini Add DigitalOcean inventory plugin 11 years ago
digital_ocean.py digital_ocean #3438: use get instead of [] to prevent KeyError 11 years ago
ec2.ini Merge plugins tree 12 years ago
ec2.py ec2 inventory plugin: fix whitespace around connection validity test 11 years ago
linode.ini Added linode plugin 11 years ago
linode.py Made Linode inventory module much faster. 11 years ago
nova.ini Improved RackSpace configuration support (needed by latest version of rackspace API) 12 years ago
nova.py OpenStack Modules 12 years ago
rax.py Initial commit of rax inventory plugin 12 years ago
spacewalk.py Do not need to chmod cache file each time 12 years ago
vagrant.py Update vagrant external inventory file to handle multiple boxes, and --list and --host params. 12 years ago
yaml.py more places to use yaml.safe_load 12 years ago