index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | archinstall/lib/locale/__init__.py | 12 | ||||
-rw-r--r-- | archinstall/lib/locale/locale_menu.py | 2 | ||||
-rw-r--r-- | archinstall/lib/locale/utils.py (renamed from archinstall/lib/locale/locale.py) | 21 |
diff --git a/archinstall/lib/locale/__init__.py b/archinstall/lib/locale/__init__.py index 6c32d6f3..90f1aecc 100644 --- a/archinstall/lib/locale/__init__.py +++ b/archinstall/lib/locale/__init__.py @@ -1,6 +1,10 @@ from .locale_menu import LocaleConfiguration -from .locale import ( - list_keyboard_languages, list_locales, list_x11_keyboard_languages, - verify_keyboard_layout, verify_x11_keyboard_layout, set_kb_layout, - list_timezones +from .utils import ( + list_keyboard_languages, + list_locales, + list_x11_keyboard_languages, + verify_keyboard_layout, + verify_x11_keyboard_layout, + list_timezones, + set_kb_layout ) diff --git a/archinstall/lib/locale/locale_menu.py b/archinstall/lib/locale/locale_menu.py index 2e254315..729b3b6e 100644 --- a/archinstall/lib/locale/locale_menu.py +++ b/archinstall/lib/locale/locale_menu.py @@ -1,7 +1,7 @@ from dataclasses import dataclass from typing import Dict, Any, TYPE_CHECKING, Optional -from .locale import set_kb_layout, list_keyboard_languages, list_locales +from .utils import list_keyboard_languages, list_locales, set_kb_layout from ..menu import Selector, AbstractSubMenu, MenuSelectionType, Menu if TYPE_CHECKING: diff --git a/archinstall/lib/locale/locale.py b/archinstall/lib/locale/utils.py index 90f20cc6..330ca0ce 100644 --- a/archinstall/lib/locale/locale.py +++ b/archinstall/lib/locale/utils.py @@ -6,8 +6,11 @@ from ..output import error def list_keyboard_languages() -> Iterator[str]: - for line in SysCommand("localectl --no-pager list-keymaps", environment_vars={'SYSTEMD_COLORS': '0'}): - yield line.decode('UTF-8').strip() + for line in SysCommand( + "localectl --no-pager list-keymaps", + environment_vars={'SYSTEMD_COLORS': '0'} + ).decode(): + yield line def list_locales() -> List[str]: @@ -22,8 +25,11 @@ def list_locales() -> List[str]: def list_x11_keyboard_languages() -> Iterator[str]: - for line in SysCommand("localectl --no-pager list-x11-keymap-layouts", environment_vars={'SYSTEMD_COLORS': '0'}): - yield line.decode('UTF-8').strip() + for line in SysCommand( + "localectl --no-pager list-x11-keymap-layouts", + environment_vars={'SYSTEMD_COLORS': '0'} + ).decode(): + yield line def verify_keyboard_layout(layout :str) -> bool: @@ -57,5 +63,8 @@ def set_kb_layout(locale :str) -> bool: def list_timezones() -> Iterator[str]: - for line in SysCommand("timedatectl --no-pager list-timezones", environment_vars={'SYSTEMD_COLORS': '0'}): - yield line.decode('UTF-8').strip() + for line in SysCommand( + "timedatectl --no-pager list-timezones", + environment_vars={'SYSTEMD_COLORS': '0'} + ).decode(): + yield line |