Merge "Fix ansible-pip-version.py script"

This commit is contained in:
Jenkins 2017-02-16 15:01:55 +00:00 committed by Gerrit Code Review
commit 1eb2924b2b

View File

@ -19,6 +19,8 @@
from __future__ import print_function
import sys
import six
in_str = sys.argv[1]
HELP_MSG = ("Unsupported version or format %s - "
"Supporting format [stable-]MAJ.MIN where MAJ.MIN is 1.9 or 2.x"
@ -27,7 +29,7 @@ HELP_MSG = ("Unsupported version or format %s - "
if in_str.startswith('stable-'):
in_version = in_str.split('stable-')[1]
else:
if in_str[0].isdecimal():
if six.text_type(in_str[0]).isdecimal():
print("ansible==%s" % in_str)
else:
print("ansible%s" % in_str)