index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Daniel Girtler <blackrabbit256@gmail.com> | 2023-10-02 21:01:23 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-02 21:01:23 +1100 |
commit | 5c903df55fac449baae1e9cc23b04f6beeb55364 (patch) | |
tree | e9715ce5f82b57a34d9b0726973187730bca8cb0 /archinstall/lib/locale | |
parent | a095e393d8517e99f8832c447fd2ef0902cb6ca6 (diff) |
-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 |