From 60b455701b8930b34a4a63ba9e16742df494802a Mon Sep 17 00:00:00 2001 From: Maciej Borzecki Date: Thu, 2 Apr 2020 08:03:57 +0200 Subject: [PATCH] subiquity/controllers: fix failure when LANG is unset Do not crash when LANG is unset. Signed-off-by: Maciej Borzecki --- subiquity/controllers/welcome.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subiquity/controllers/welcome.py b/subiquity/controllers/welcome.py index f21f4be3..55bca45f 100644 --- a/subiquity/controllers/welcome.py +++ b/subiquity/controllers/welcome.py @@ -37,7 +37,7 @@ class WelcomeController(SubiquityController): def start(self): lang = os.environ.get("LANG") - if lang.endswith(".UTF-8"): + if lang is not None and lang.endswith(".UTF-8"): lang = lang.rsplit('.', 1)[0] for code, name in self.model.supported_languages: if code == lang: