add more flexible whitespace to locale_gen search

Fixes #17245.
This commit is contained in:
Justin Findlay 2015-05-05 17:10:15 -06:00
parent 0c76dd4d8a
commit 0941fefd2b

View file

@ -264,7 +264,7 @@ def gen_locale(locale):
if os.path.exists('/etc/locale.gen'):
__salt__['file.replace'](
'/etc/locale.gen',
r'^#\s*{0}$'.format(locale),
r'^\s*#\s*{0}\s*$'.format(locale),
'{0}'.format(locale),
append_if_not_found=True
)