locale module: don't escape the slash in \n

this would cause the literal string "en_US.UTF8\n" to be appended to the
locale file.
This commit is contained in:
Andreas Lutro 2015-12-26 21:50:48 +01:00
parent a3410fdf41
commit 5799729aee

View file

@ -276,7 +276,7 @@ def gen_locale(locale, **kwargs):
__salt__['file.replace'](
'/etc/locale.gen',
r'^\s*#\s*{0}\s*$'.format(locale),
'{0}\\n'.format(locale),
'{0}\n'.format(locale),
append_if_not_found=True
)
elif on_ubuntu: