ansible/ansible — pull request #2402 by dparalen (2013-03-15 09:21:35+00:00)
Title: check hostname presence

Hi,
I'd like to propose a patch for this stack dump which happens in case host does not exist in EC2 anymore:
```
./ec2.py --host ec2-54-235-235-92.compute-1.amazonaws.com
Traceback (most recent call last):
File "./ec2.py", line 424, in
Ec2Inventory()
File "./ec2.py", line 149, in __init__
data_to_print = self.get_host_info()
File "./ec2.py", line 332, in get_host_info
(region, instance_id) = self.index[self.args.host]
KeyError: 'ec2-54-235-235-92.compute-1.amazonaws.com'
```
With the suggested patch an empty host dict is returned instead

Thanks!