Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(923)

Unified Diff: presubmit_support.py

Issue 1520025: Fix presubmit_unittests on some versions of python2.5.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_support.py
===================================================================
--- presubmit_support.py (revision 43902)
+++ presubmit_support.py (working copy)
@@ -39,7 +39,10 @@
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
M-A Ruel 2010/04/08 01:31:58 That doesn't throw on 2.6? In any case, even if i
+ 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698