Fixes #6411 Return None for ec2 api endpoints that return 404

reviewable/pr18780/r1
James Tanner 11 years ago
parent c692d432a6
commit 21c4378ad5

@ -71,7 +71,11 @@ class Ec2Metadata(object):
def _fetch(self, url):
(response, info) = fetch_url(self.module, url, force=True)
return response.read()
if response:
data = response.read()
else:
data = None
return data
def _mangle_fields(self, fields, uri, filter_patterns=['public-keys-0']):
new_fields = {}

Loading…
Cancel
Save