boto/boto — pull request #2696 by paxan (2014-10-20 18:15:03+00:00)
Title: Parse ClusterStatus’es StateChangeReason.

I've ran into this issue when writing code to detect the EMR cluster's demise reason. Turns out Boto wasn't parsing [**it.**][aws-doc]

[aws-doc]: http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_ClusterStateChangeReason.html

Here's the patch. And here it is in action:

```
>>> import boto, boto.emr
>>> emr = boto.emr.connect_to_region('us-east-1')
>>> cs=emr.list_clusters().clusters
>>> cs[0]

>>> cs[0].status

>>> cs[0].status.state
u'TERMINATED'
>>> cs[0].status.statechangereason

>>> cs[0].status.statechangereason.code
u'USER_REQUEST'
>>> cs[0].status.statechangereason.message
u'Terminated by user request'
```