diff --git a/src/modules/localecfg/main.py b/src/modules/localecfg/main.py index 155382aabb..e6c37133bb 100644 --- a/src/modules/localecfg/main.py +++ b/src/modules/localecfg/main.py @@ -65,15 +65,12 @@ def run(): with open("{!s}/etc/locale.gen".format(install_path), "w") as gen: for line in text: # always enable en_US - if line.startswith(en_us_locale, 1): + if line.startswith("#" + en_us_locale): # uncomment line line = line[1:].lstrip() for locale_value in locale_values: - # check the locale value starting from - # the second index because we expect that - # the first one is a '#' - if line.startswith(locale_value, 1): + if line.startswith("#" + locale_value): # uncomment line line = line[1:].lstrip()