Fix pkg.latest_version using localized output

This fixes #36561.
This commit is contained in:
Mathieu Le Marec - Pasquet 2016-09-25 09:49:30 +00:00
parent 07c9d040c0
commit 47c3d03035

View File

@ -261,7 +261,8 @@ def latest_version(*names, **kwargs):
if isinstance(repo, list):
cmd = cmd + repo
out = __salt__['cmd.run_all'](cmd, python_shell=False,
output_loglevel='trace')
output_loglevel='trace',
env={'LC_ALL': 'C', 'LANG': 'C'})
candidate = ''
for line in out['stdout'].splitlines():
if 'Candidate' in line: