boto/boto — pull request #1526 by andresriancho (2013-06-03 18:21:34+00:00)
Title: Fix for metadata usage

Fixes this error:

```python
Traceback (most recent call last):
File "test.py", line 2, in
print get_credentials()
File "/tmp/src/boto/boto/core/credentials.py", line 152, in get_credentials
secret_key_name='secret_key')
File "/tmp/src/boto/boto/core/credentials.py", line 72, in search_metadata
metadata = metadata['iam']['security-credentials'].values()[0]
KeyError: 'iam'
```

Which is produced when the metadata holds:

```text
{'info': {'Message': 'Instance Profile with Id AIP...NJO cannot be found. Please see documentation at http://docs.amazonwebservices.com/IAM/latest/UserGuide/RolesTroubleshooting.html.', 'Code': 'InstanceProfileNotFound', 'LastUpdated': '2013-06-03T17:09:24Z'}}

```