index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Daemon Coder <11915375+codefiles@users.noreply.github.com> | 2023-05-04 04:42:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-04 10:42:37 +0200 |
commit | fd83f073f3e84feb1388ef739c1096f7d4a741de (patch) | |
tree | 7662dea329d998e3912b6bd2d9c2e076b5f4a856 /archinstall/lib/locale_helpers.py | |
parent | adceed22ad3d8b6aa1e6d1aee56ae0c9a0a751aa (diff) |
-rw-r--r-- | archinstall/lib/locale_helpers.py | 8 |
diff --git a/archinstall/lib/locale_helpers.py b/archinstall/lib/locale_helpers.py index d1fb4562..efb0365f 100644 --- a/archinstall/lib/locale_helpers.py +++ b/archinstall/lib/locale_helpers.py @@ -1,7 +1,7 @@ import logging from typing import Iterator, List, Callable, Optional -from .exceptions import ServiceException +from .exceptions import ServiceException, SysCallError from .general import SysCommand from .output import log from .storage import storage @@ -161,8 +161,10 @@ def set_keyboard_language(locale :str) -> bool: log(f"Invalid keyboard locale specified: {locale}", fg="red", level=logging.ERROR) return False - if (output := SysCommand(f'localectl set-keymap {locale}')).exit_code != 0: - raise ServiceException(f"Unable to set locale '{locale}' for console: {output}") + try: + SysCommand(f'localectl set-keymap {locale}') + except SysCallError as error: + raise ServiceException(f"Unable to set locale '{locale}' for console: {error}") return True |