Просмотр исходного кода

Add an alert for python < 2.5.

Don't block execution.

Python 2.4 has been untested for a while and may break unexpectedly.

TEST=manual testing
BUG=none

Review URL: http://codereview.chromium.org/5110009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@66870 0039d316-1c4b-4281-b951-d872f2087c98
maruel@chromium.org 14 лет назад
Родитель
Сommit
c3a15a2381
2 измененных файлов с 6 добавлено и 0 удалено
  1. 3 0
      gcl.py
  2. 3 0
      gclient.py

+ 3 - 0
gcl.py

@@ -1351,6 +1351,9 @@ def CMDhelp(args):
 
 
 def main(argv):
+  if sys.hexversion < 0x02050000:
+    print >> sys.stderr, (
+        '\nYour python version is unsupported, please upgrade.\n')
   if not argv:
     argv = ['help']
   command = Command(argv[0])

+ 3 - 0
gclient.py

@@ -1193,6 +1193,9 @@ def GenUsage(parser, command):
 def Main(argv):
   """Doesn't parse the arguments here, just find the right subcommand to
   execute."""
+  if sys.hexversion < 0x02050000:
+    print >> sys.stderr, (
+        '\nYour python version is unsupported, please upgrade.\n')
   try:
     # Make stdout auto-flush so buildbot doesn't kill us during lengthy
     # operations. Python as a strong tendency to buffer sys.stdout.