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

Side by Side Diff: presubmit_support.py

Issue 1110006: Fix import of simplejson included in depot_tools (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Enables directory-specific presubmit checks to run at upload and/or commit. 6 """Enables directory-specific presubmit checks to run at upload and/or commit.
7 """ 7 """
8 8
9 __version__ = '1.3.4' 9 __version__ = '1.3.4'
10 10
(...skipping 23 matching lines...) Expand all
34 import urllib2 # Exposed through the API. 34 import urllib2 # Exposed through the API.
35 import warnings 35 import warnings
36 36
37 try: 37 try:
38 import simplejson as json 38 import simplejson as json
39 except ImportError: 39 except ImportError:
40 try: 40 try:
41 import json 41 import json
42 except ImportError: 42 except ImportError:
43 # Import the one included in depot_tools. 43 # Import the one included in depot_tools.
44 import third_party.simplejson as json 44 sys.path.append(os.path.join(os.path.dirname(__file__), 'third_party'))
45 import simplejson as json
45 46
46 # Local imports. 47 # Local imports.
47 import gcl 48 import gcl
48 import gclient_utils 49 import gclient_utils
49 import presubmit_canned_checks 50 import presubmit_canned_checks
50 import scm 51 import scm
51 52
52 53
53 # Ask for feedback only once in program lifetime. 54 # Ask for feedback only once in program lifetime.
54 _ASKED_FOR_FEEDBACK = False 55 _ASKED_FOR_FEEDBACK = False
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 options.commit, 1060 options.commit,
1060 options.verbose, 1061 options.verbose,
1061 sys.stdout, 1062 sys.stdout,
1062 sys.stdin, 1063 sys.stdin,
1063 options.default_presubmit, 1064 options.default_presubmit,
1064 options.may_prompt) 1065 options.may_prompt)
1065 1066
1066 1067
1067 if __name__ == '__main__': 1068 if __name__ == '__main__':
1068 sys.exit(Main(sys.argv)) 1069 sys.exit(Main(sys.argv))
OLDNEW
« 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