diff options
Diffstat (limited to 'repo')
-rwxr-xr-x | repo | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -113,7 +113,7 @@ repodir = '.repo' # name of repo's private directory | |||
113 | S_repo = 'repo' # special repo repository | 113 | S_repo = 'repo' # special repo repository |
114 | S_manifests = 'manifests' # special manifest repository | 114 | S_manifests = 'manifests' # special manifest repository |
115 | REPO_MAIN = S_repo + '/main.py' # main script | 115 | REPO_MAIN = S_repo + '/main.py' # main script |
116 | MIN_PYTHON_VERSION = (2, 6) # minimum supported python version | 116 | MIN_PYTHON_VERSION = (2, 7) # minimum supported python version |
117 | GITC_CONFIG_FILE = '/gitc/.config' | 117 | GITC_CONFIG_FILE = '/gitc/.config' |
118 | GITC_FS_ROOT_DIR = '/gitc/manifest-rw/' | 118 | GITC_FS_ROOT_DIR = '/gitc/manifest-rw/' |
119 | 119 | ||
@@ -152,9 +152,12 @@ def _print(*objects, **kwargs): | |||
152 | # Python version check | 152 | # Python version check |
153 | ver = sys.version_info | 153 | ver = sys.version_info |
154 | if (ver[0], ver[1]) < MIN_PYTHON_VERSION: | 154 | if (ver[0], ver[1]) < MIN_PYTHON_VERSION: |
155 | _print('error: Python version %s unsupported.\n' | 155 | _print('error: Python version {} unsupported.\n' |
156 | 'Please use Python 2.6 - 2.7 instead.' | 156 | 'Please use Python {}.{} instead.'.format( |
157 | % sys.version.split(' ')[0], file=sys.stderr) | 157 | sys.version.split(' ')[0], |
158 | MIN_PYTHON_VERSION[0], | ||
159 | MIN_PYTHON_VERSION[1], | ||
160 | ), file=sys.stderr) | ||
158 | sys.exit(1) | 161 | sys.exit(1) |
159 | 162 | ||
160 | home_dot_repo = os.path.expanduser('~/.repoconfig') | 163 | home_dot_repo = os.path.expanduser('~/.repoconfig') |
@@ -909,6 +912,6 @@ def main(orig_args): | |||
909 | if __name__ == '__main__': | 912 | if __name__ == '__main__': |
910 | if ver[0] == 3: | 913 | if ver[0] == 3: |
911 | _print('warning: Python 3 support is currently experimental. YMMV.\n' | 914 | _print('warning: Python 3 support is currently experimental. YMMV.\n' |
912 | 'Please use Python 2.6 - 2.7 instead.', | 915 | 'Please use Python 2.7 instead.', |
913 | file=sys.stderr) | 916 | file=sys.stderr) |
914 | main(sys.argv[1:]) | 917 | main(sys.argv[1:]) |