diff options
| -rwxr-xr-x | main.py | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python3 |
| 2 | # -*- coding:utf-8 -*- | 2 | # -*- coding:utf-8 -*- |
| 3 | # | 3 | # |
| 4 | # Copyright (C) 2008 The Android Open Source Project | 4 | # Copyright (C) 2008 The Android Open Source Project |
| @@ -85,9 +85,10 @@ MIN_PYTHON_VERSION_SOFT = (3, 6) | |||
| 85 | MIN_PYTHON_VERSION_HARD = (3, 4) | 85 | MIN_PYTHON_VERSION_HARD = (3, 4) |
| 86 | 86 | ||
| 87 | if sys.version_info.major < 3: | 87 | if sys.version_info.major < 3: |
| 88 | print('repo: warning: Python 2 is no longer supported; ' | 88 | print('repo: error: Python 2 is no longer supported; ' |
| 89 | 'Please upgrade to Python {}.{}+.'.format(*MIN_PYTHON_VERSION_SOFT), | 89 | 'Please upgrade to Python {}.{}+.'.format(*MIN_PYTHON_VERSION_SOFT), |
| 90 | file=sys.stderr) | 90 | file=sys.stderr) |
| 91 | sys.exit(1) | ||
| 91 | else: | 92 | else: |
| 92 | if sys.version_info < MIN_PYTHON_VERSION_HARD: | 93 | if sys.version_info < MIN_PYTHON_VERSION_HARD: |
| 93 | print('repo: error: Python 3 version is too old; ' | 94 | print('repo: error: Python 3 version is too old; ' |
