From ae95d51f25bcc3425a7cee2fa423e4056dba761f Mon Sep 17 00:00:00 2001 From: Daniel Harris Date: Tue, 18 Sep 2012 17:46:09 -0300 Subject: [PATCH] Use simplejson when json module not available If python<2.6 is used (including Jython), the json module isn't yet available in the standard library. Using simplejson as a fallback, if available, would be nice. --- boto/iam/connection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/boto/iam/connection.py b/boto/iam/connection.py index fb521da657..df9e17f26e 100644 --- a/boto/iam/connection.py +++ b/boto/iam/connection.py @@ -19,7 +19,10 @@ # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. -import json +try: + import json +except ImportError: + import simplejson as json import boto import boto.jsonresponse