yum: use the C locale when screen scraping (#32203)

(cherry picked from commit a8ab1a0b20)
pull/32630/head
Martin Krizek 8 years ago
parent 274503991e
commit 36bcab8a68

@ -1111,7 +1111,8 @@ def latest(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos, in
res['changed'] = True
elif len(pkgs['install']) or len(will_update):
cmd = yum_basecmd + ['install'] + pkgs['install'] + pkgs['update']
rc, out, err = module.run_command(cmd)
lang_env = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C')
rc, out, err = module.run_command(cmd, environ_update=lang_env)
out_lower = out.strip().lower()
if not out_lower.endswith("no packages marked for update") and \
not out_lower.endswith("nothing to do"):

Loading…
Cancel
Save