diff options
-rwxr-xr-x | repo | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -103,8 +103,8 @@ def check_python_version(): | |||
103 | break | 103 | break |
104 | reexec('python{}.{}'.format(min_major, min_minor - inc)) | 104 | reexec('python{}.{}'.format(min_major, min_minor - inc)) |
105 | 105 | ||
106 | # Try the generic Python 3 wrapper, but only if it's new enough. We don't | 106 | # Try the generic Python 3 wrapper, but only if it's new enough. If it |
107 | # want to go from (still supported) Python 2.7 to (unsupported) Python 3.5. | 107 | # isn't, we want to just give up below and make the user resolve things. |
108 | try: | 108 | try: |
109 | proc = subprocess.Popen( | 109 | proc = subprocess.Popen( |
110 | ['python3', '-c', 'import sys; ' | 110 | ['python3', '-c', 'import sys; ' |
@@ -122,9 +122,10 @@ def check_python_version(): | |||
122 | 122 | ||
123 | # We're still here, so diagnose things for the user. | 123 | # We're still here, so diagnose things for the user. |
124 | if major < 3: | 124 | if major < 3: |
125 | print('repo: warning: Python 2 is no longer supported; ' | 125 | print('repo: error: Python 2 is no longer supported; ' |
126 | 'Please upgrade to Python {}.{}+.'.format(*MIN_PYTHON_VERSION_HARD), | 126 | 'Please upgrade to Python {}.{}+.'.format(*MIN_PYTHON_VERSION_HARD), |
127 | file=sys.stderr) | 127 | file=sys.stderr) |
128 | sys.exit(1) | ||
128 | elif (major, minor) < MIN_PYTHON_VERSION_HARD: | 129 | elif (major, minor) < MIN_PYTHON_VERSION_HARD: |
129 | print('repo: error: Python 3 version is too old; ' | 130 | print('repo: error: Python 3 version is too old; ' |
130 | 'Please use Python {}.{} or newer.'.format(*MIN_PYTHON_VERSION_HARD), | 131 | 'Please use Python {}.{} or newer.'.format(*MIN_PYTHON_VERSION_HARD), |