Merge "Prevent warning twice about Python 3 usage"

This commit is contained in:
David Pursehouse 2014-05-07 06:30:28 +00:00 committed by Gerrit Code Review
commit 65e3a78a9e

8
repo
View File

@ -139,10 +139,6 @@ def _print(*objects, **kwargs):
# Python version check # Python version check
ver = sys.version_info ver = sys.version_info
if ver[0] == 3:
_print('warning: Python 3 support is currently experimental. YMMV.\n'
'Please use Python 2.6 - 2.7 instead.',
file=sys.stderr)
if (ver[0], ver[1]) < MIN_PYTHON_VERSION: if (ver[0], ver[1]) < MIN_PYTHON_VERSION:
_print('error: Python version %s unsupported.\n' _print('error: Python version %s unsupported.\n'
'Please use Python 2.6 - 2.7 instead.' 'Please use Python 2.6 - 2.7 instead.'
@ -768,4 +764,8 @@ def main(orig_args):
if __name__ == '__main__': if __name__ == '__main__':
if ver[0] == 3:
_print('warning: Python 3 support is currently experimental. YMMV.\n'
'Please use Python 2.6 - 2.7 instead.',
file=sys.stderr)
main(sys.argv[1:]) main(sys.argv[1:])