Commit 5e9f2ed7 authored by tony@chromium.org's avatar tony@chromium.org

Fix presubmit_unittests on some versions of python2.5.

On our hardy boxes, the python has the json module, but it doesn't
have all the expected methods.  Fallback to simplejson if it
doesn't have json.loads().

Review URL: http://codereview.chromium.org/1520025

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@43907 0039d316-1c4b-4281-b951-d872f2087c98
parent e5299012
......@@ -39,7 +39,10 @@ try:
except ImportError:
try:
import json
except ImportError:
# Some versions of python2.5 have an incomplete json module. Check to make
# sure loads exists.
json.loads
except (ImportError, AttributeError):
# Import the one included in depot_tools.
sys.path.append(os.path.join(os.path.dirname(__file__), 'third_party'))
import simplejson as json
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment