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

Unified Diff: presubmit_support.py

Issue 6791018: Add a warning if the current version of python is not 2.5 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Updated to work seamlessly with python 2.5 Created 9 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 | « presubmit_canned_checks.py ('k') | trychange.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 5a003eba0040c64f9c203f6551ece6c0651ff576..fcc6a8555c036a4a469958cb1fa12e5d19f9c7eb 100755
--- a/presubmit_support.py
+++ b/presubmit_support.py
@@ -1,5 +1,5 @@
-#!/usr/bin/python
-# Copyright (c) 2010 The Chromium Authors. All rights reserved.
+#!/usr/bin/env python
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -38,13 +38,8 @@ try:
import simplejson as json # pylint: disable=F0401
except ImportError:
try:
- import json
- # Some versions of python2.5 have an incomplete json module. Check to make
- # sure loads exists.
- # Statement seems to have no effect
- # pylint: disable=W0104
- json.loads
- except (ImportError, AttributeError):
+ import json # pylint: disable=F0401
+ except ImportError:
# Import the one included in depot_tools.
sys.path.append(os.path.join(os.path.dirname(__file__), 'third_party'))
import simplejson as json # pylint: disable=F0401
« no previous file with comments | « presubmit_canned_checks.py ('k') | trychange.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698