Merge pull request #47017 from Unity-Technologies/hotfix/pip_windows

Don’t encode a unicode string
This commit is contained in:
Nicole Thomas 2018-04-13 09:31:32 -04:00 committed by GitHub
commit d8c4c221cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,7 +130,8 @@ def _get_pip_bin(bin_env):
'pip{0}'.format(sys.version_info[0]),
'pip', 'pip-python']
)
if salt.utils.platform.is_windows() and six.PY2:
if salt.utils.platform.is_windows() and six.PY2 \
and isinstance(which_result, str):
which_result.encode('string-escape')
if which_result is None:
raise CommandNotFoundError('Could not find a `pip` binary')