From c6391741a2fbd06bbcea392b8a32cfd3d716a76b Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sat, 25 Jul 2015 11:57:21 +0200 Subject: [PATCH] Do not assume that /var/lib/locales/supported.d/local exist Since people can generate their own image with debootstrap, and this wouldn't create a file /var/lib/locales/supported.d/local, better check if it exist and work if it doesn't. Fix #656 --- lib/ansible/modules/extras/system/locale_gen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/system/locale_gen.py b/lib/ansible/modules/extras/system/locale_gen.py index 06503b07ab2..acf5b78ec97 100644 --- a/lib/ansible/modules/extras/system/locale_gen.py +++ b/lib/ansible/modules/extras/system/locale_gen.py @@ -175,7 +175,7 @@ def main(): state = module.params['state'] if not os.path.exists("/etc/locale.gen"): - if os.path.exists("/var/lib/locales/supported.d/local"): + if os.path.exists("/var/lib/locales/supported.d/"): # Ubuntu created its own system to manage locales. ubuntuMode = True else: