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

Unified Diff: presubmit_support.py

Issue 1116001: Add input_api.json to presubmit checks. (Closed)
Patch Set: Created 10 years, 9 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 | tests/presubmit_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_support.py
diff --git a/presubmit_support.py b/presubmit_support.py
index 5853e0b3d30f930011ac142196caa4f8764c0fff..d1c54f52cdb66675e954f562021f434fd7d023f2 100755
--- a/presubmit_support.py
+++ b/presubmit_support.py
@@ -34,6 +34,15 @@ import unittest # Exposed through the API.
import urllib2 # Exposed through the API.
import warnings
+# json may not be available.
+try:
+ import simplejson as json
+except ImportError:
+ try:
+ import json
+ except ImportError:
+ json = None
+
# Local imports.
import gcl
import gclient_utils
@@ -196,6 +205,7 @@ class InputApi(object):
self.basename = os.path.basename
self.cPickle = cPickle
self.cStringIO = cStringIO
+ self.json = json
self.os_path = os.path
self.pickle = pickle
self.marshal = marshal
« no previous file with comments | « no previous file | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698