dnf: fix output parsing on non-English LANGUAGE systems (#78233)

Fixes #78193
pull/78245/head
Martin Krizek 2 years ago committed by GitHub
parent b1dd2af4ca
commit 630616103e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- "dnf - fix output parsing on systems with ``LANGUAGE`` set to a language other than English (https://github.com/ansible/ansible/issues/78193)"

@ -553,7 +553,8 @@ class DnfModule(YumDnf):
def _ensure_dnf(self):
locale = get_best_parsable_locale(self.module)
os.environ['LC_ALL'] = os.environ['LC_MESSAGES'] = os.environ['LANG'] = locale
os.environ['LC_ALL'] = os.environ['LC_MESSAGES'] = locale
os.environ['LANGUAGE'] = os.environ['LANG'] = locale
global dnf
try:

Loading…
Cancel
Save