From 00bd48ce9a7ac00e6b47610a9477b43016acd080 Mon Sep 17 00:00:00 2001 From: Vendula Poncova Date: Mon, 1 Mar 2021 11:54:34 +0100 Subject: [PATCH] Choose the best locale more carefully (#1933384) Use the default locale if there are no locales to choose from. Resolves: rhbz#1933384 --- pyanaconda/ui/gui/spokes/welcome.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyanaconda/ui/gui/spokes/welcome.py b/pyanaconda/ui/gui/spokes/welcome.py index fb49188c1..0e17d8106 100644 --- a/pyanaconda/ui/gui/spokes/welcome.py +++ b/pyanaconda/ui/gui/spokes/welcome.py @@ -228,7 +228,8 @@ class WelcomeLanguageSpoke(StandaloneSpoke, LangLocaleHandler): store.set(commonLangsItr, 0, "", 1, "", 2, "", 3, True) # setup the "best" locale - locale = localization.setup_locale(locales[0], self._l12_module) + best_locale = locales[0] if locales else DEFAULT_LANG + locale = localization.setup_locale(best_locale, self._l12_module) self._set_lang(locale) self._select_locale(self._l12_module.Language) -- 2.26.2