From c3f182bc9bf4cdc93b939a4005b9b8d8a3186bcd Mon Sep 17 00:00:00 2001 From: Augustus Kling Date: Mon, 20 Jan 2014 00:11:01 +0100 Subject: [PATCH] Fix error reporting in case locale-gen fails on non-Ubuntu systems. --- library/system/locale | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/system/locale b/library/system/locale index 577f34bc3e..81f33dec9c 100644 --- a/library/system/locale +++ b/library/system/locale @@ -70,7 +70,7 @@ def apply_change(targetState, name, encoding): localeGenExitValue = call("locale-gen") if localeGenExitValue!=0: - module.fail_json(msg="locale.gen failed to execute, it returned "+str(localeGenExitValue)) + raise EnvironmentError(localeGenExitValue, "locale.gen failed to execute, it returned "+str(localeGenExitValue)) def apply_change_ubuntu(targetState, name, encoding): """Create or remove locale.