index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds@gmail.com> | 2021-04-21 13:10:56 +0200 |
---|---|---|
committer | Anton Hvornum <anton.feeds@gmail.com> | 2021-04-21 13:10:56 +0200 |
commit | ccb75f70b9468cb9e8485bb6a0692026ea1862a7 (patch) | |
tree | a96058275c0974f3f2d9ae438a90ff5d64864735 /archinstall/lib/locale_helpers.py | |
parent | 8b9f16a0284c5261a29b9818809cbe45a9c0c10b (diff) | |
parent | 752d7b7a8d28dff0c40d7fada823d94c92fcd195 (diff) |
-rw-r--r-- | archinstall/lib/locale_helpers.py | 13 |
diff --git a/archinstall/lib/locale_helpers.py b/archinstall/lib/locale_helpers.py index 82964dc9..736bfc47 100644 --- a/archinstall/lib/locale_helpers.py +++ b/archinstall/lib/locale_helpers.py @@ -4,27 +4,22 @@ import os from .exceptions import * # from .general import sys_command -def list_keyboard_languages(layout='qwerty'): +def list_keyboard_languages(): locale_dir = '/usr/share/kbd/keymaps/' if not os.path.isdir(locale_dir): raise RequirementError(f'Directory containing locales does not exist: {locale_dir}') for root, folders, files in os.walk(locale_dir): - # Since qwerty is under /i386/ but other layouts are - # in different spots, we'll need to filter the last foldername - # of the path to verify against the desired layout. - if os.path.basename(root) != layout: - continue for file in files: if os.path.splitext(file)[1] == '.gz': yield file.strip('.gz').strip('.map') -def search_keyboard_layout(filter, layout='qwerty'): - for language in list_keyboard_languages(layout): +def search_keyboard_layout(filter): + for language in list_keyboard_languages(): if filter.lower() in language.lower(): yield language def set_keyboard_language(locale): - return subprocess.call(['loadkeys',locale]) == 0 + return subprocess.call(['loadkeys', locale]) == 0 |