summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony King <anthonydking@slimroms.net>2014-05-05 20:37:05 +0100
committerAnthony King <anthonydking@slimroms.net>2014-05-06 12:44:22 +0000
commit6efdde9f6eeca185aafa7393f6e61fd3aefa1cbe (patch)
tree3ab98d4a7fdd3e250c60a3d069d8b2bb9132938a
parent666d534636d262cbfd971509dd0f0be0cddb2e11 (diff)
downloadgit-repo-6efdde9f6eeca185aafa7393f6e61fd3aefa1cbe.tar.gz
Prevent warning twice about Python 3 usage
Only warn about using Python 3 when running the repo script directly. This prevents the user being warned twice. Change-Id: I2ee51ea2fa0127ea310598320e460ec9f38c6488
-rwxr-xr-xrepo8
1 files changed, 4 insertions, 4 deletions
diff --git a/repo b/repo
index b8c414be..3fd0166e 100755
--- a/repo
+++ b/repo
@@ -139,10 +139,6 @@ def _print(*objects, **kwargs):
139 139
140# Python version check 140# Python version check
141ver = sys.version_info 141ver = sys.version_info
142if ver[0] == 3:
143 _print('warning: Python 3 support is currently experimental. YMMV.\n'
144 'Please use Python 2.6 - 2.7 instead.',
145 file=sys.stderr)
146if (ver[0], ver[1]) < MIN_PYTHON_VERSION: 142if (ver[0], ver[1]) < MIN_PYTHON_VERSION:
147 _print('error: Python version %s unsupported.\n' 143 _print('error: Python version %s unsupported.\n'
148 'Please use Python 2.6 - 2.7 instead.' 144 'Please use Python 2.6 - 2.7 instead.'
@@ -768,4 +764,8 @@ def main(orig_args):
768 764
769 765
770if __name__ == '__main__': 766if __name__ == '__main__':
767 if ver[0] == 3:
768 _print('warning: Python 3 support is currently experimental. YMMV.\n'
769 'Please use Python 2.6 - 2.7 instead.',
770 file=sys.stderr)
771 main(sys.argv[1:]) 771 main(sys.argv[1:])