mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
rhsm_repository: use C locale for out/err scraping (#40338)
This commit is contained in:
parent
484b86a643
commit
a996d4836a
1 changed files with 2 additions and 1 deletions
|
@ -88,7 +88,8 @@ def run_subscription_manager(module, arguments):
|
|||
if not rhsm_bin:
|
||||
module.fail_json(msg='The executable file subscription-manager was not found in PATH')
|
||||
|
||||
rc, out, err = module.run_command("%s %s" % (rhsm_bin, " ".join(arguments)))
|
||||
lang_env = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C')
|
||||
rc, out, err = module.run_command("%s %s" % (rhsm_bin, " ".join(arguments)), environ_update=lang_env)
|
||||
|
||||
if rc == 1 and (err == 'The password you typed is invalid.\nPlease try again.\n' or os.getuid() != 0):
|
||||
module.fail_json(msg='The executable file subscription-manager must be run using root privileges')
|
||||
|
|
Loading…
Reference in a new issue