Also set the environment variables when resetting the locale to C

pull/7527/head
James Cammarata 12 years ago
parent 362626d07c
commit d72cd70cc8

@ -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…
Cancel
Save