mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Also set the environment variables when resetting the locale to C
This commit is contained in:
parent
1f0be3753d
commit
0ac74aaf59
1 changed files with 2 additions and 0 deletions
|
@ -580,6 +580,8 @@ class AnsibleModule(object):
|
|||
# issues but is preferable to simply failing because
|
||||
# of an unknown locale
|
||||
locale.setlocale(locale.LC_ALL, 'C')
|
||||
os.environ['LANG'] = 'C'
|
||||
os.environ['LC_CTYPE'] = 'C'
|
||||
except Exception, e:
|
||||
self.fail_json(msg="An unknown error was encountered while attempting to validate the locale: %s" % e)
|
||||
|
||||
|
|
Loading…
Reference in a new issue