From dc527090ac5193ea4ac50e9198ebe616f6ee9ac0 Mon Sep 17 00:00:00 2001 From: Jeff Buchbinder Date: Mon, 30 Jul 2012 12:33:29 -0400 Subject: [PATCH] Fix for RHEL/CentOS old Python versions. --- elasticsearch/python_modules/elasticsearch.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/elasticsearch/python_modules/elasticsearch.py b/elasticsearch/python_modules/elasticsearch.py index 8f0fa895..c51938d0 100755 --- a/elasticsearch/python_modules/elasticsearch.py +++ b/elasticsearch/python_modules/elasticsearch.py @@ -1,6 +1,8 @@ #! /usr/bin/python -import json +try: import simplejson as json +except ImportError: import json + import time import urllib