Bug 537571 - client.py should error out early if wrong python version;
authorSerge Gautherie <sgautherie.bz@free.fr>
Sat, 16 Jan 2010 07:54:00 -0500
changeset 4716 ed37438a476a49c7817be5e9f5d649134bf9cbd1
parent 4715 a7bc632efcd7d0a8f4ce2b416a2906a8d5ae5e4d
child 4717 05b230cb06233c976fbc1e590be472ac809b03dc
push idunknown
push userunknown
push dateunknown
bugs537571
Bug 537571 - client.py should error out early if wrong python version; (Bv1) Detect v1- and (future) v4+ too. r+=Gozer
client.py
--- a/client.py
+++ b/client.py
@@ -44,19 +44,19 @@ SWITCH_MOZILLA_REPO_OLD_REPO_LOCATION = 
 # This should be the same as DEFAULT_MOZILLA_REPO but using %s instead of http
 # for the scheme.
 SWITCH_MOZILLA_REPO_REPLACE = '%s://hg.mozilla.org/mozilla-central/'
 SWITCH_MOZILLA_BASE_REV = "GECKO_1_9_1_BASE"
 
 import sys
 # Test Python Version. 2.4 required for `import subprocess`
 pyver = sys.version_info
-if pyver[0] == 2 and pyver[1] < 4:
+if pyver[0] <= 1 or (pyver[0] == 2 and pyver[1] < 4):
   sys.exit("ERROR: Python 2.4 or newer required")
-elif pyver[0] == 3:
+elif pyver[0] >= 3:
   sys.exit("ERROR: Python series 3 is not supported, use series 2 > 2.4")
 del pyver
 
 import os
 import datetime
 from optparse import OptionParser
 
 topsrcdir = os.path.dirname(__file__)