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

Unified Diff: PRESUBMIT.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 | « no previous file | chrome-update.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index c09f69ad694e265e92833679235026831918f824..ffe82a1ccfb274bbd0cd57a5b8a225a09ab1370c 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -11,6 +11,17 @@ details on the presubmit API built into depot_tools.
def CommonChecks(input_api, output_api):
results = []
+ import sys
+ if not sys.version.startswith('2.5'):
+ # Depot_tools has the particularity that it needs to be tested on python
+ # 2.5. But we don't want the presubmit check to fail if it is not installed.
+ results.append(output_api.PresubmitNotifyResult(
+ 'You should install python 2.5 and run ln -s $(which python2.5) python.'
+ '\n'
+ 'A great place to put this symlink is in depot_tools.\n'
+ 'Otherwise, you break depot_tools on python 2.5, you get to keep the '
+ 'pieces.'))
+
results.extend(input_api.canned_checks.CheckOwners(input_api, output_api))
black_list = list(input_api.DEFAULT_BLACK_LIST) + [
« no previous file with comments | « no previous file | chrome-update.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698