Commit 0ac74aaf by James Cammarata

Also set the environment variables when resetting the locale to C

parent 1f0be375
...@@ -580,6 +580,8 @@ class AnsibleModule(object): ...@@ -580,6 +580,8 @@ class AnsibleModule(object):
# issues but is preferable to simply failing because # issues but is preferable to simply failing because
# of an unknown locale # of an unknown locale
locale.setlocale(locale.LC_ALL, 'C') locale.setlocale(locale.LC_ALL, 'C')
os.environ['LANG'] = 'C'
os.environ['LC_CTYPE'] = 'C'
except Exception, e: except Exception, e:
self.fail_json(msg="An unknown error was encountered while attempting to validate the locale: %s" % e) self.fail_json(msg="An unknown error was encountered while attempting to validate the locale: %s" % e)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment