Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/menu/abstract_menu.py
diff options
context:
space:
mode:
authorDaniel Girtler <blackrabbit256@gmail.com>2023-05-12 02:30:09 +1000
committerGitHub <noreply@github.com>2023-05-11 18:30:09 +0200
commit89cefb9a1c7d4c4968e7d8645149078e601c9d1c (patch)
tree12c84bdcef1b0ef3f8a21977e25c7f0f89388138 /archinstall/lib/menu/abstract_menu.py
parent6e6b850a8f687b193172aaa321d49bd2956c1d4f (diff)
Cleanup imports and unused code (#1801)
* Cleanup imports and unused code * Update build check * Keep deprecation exception * Simplify logging --------- Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'archinstall/lib/menu/abstract_menu.py')
-rw-r--r--archinstall/lib/menu/abstract_menu.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/archinstall/lib/menu/abstract_menu.py b/archinstall/lib/menu/abstract_menu.py
index e44d65a4..2bd56374 100644
--- a/archinstall/lib/menu/abstract_menu.py
+++ b/archinstall/lib/menu/abstract_menu.py
@@ -1,11 +1,10 @@
from __future__ import annotations
-import logging
from typing import Callable, Any, List, Iterator, Tuple, Optional, Dict, TYPE_CHECKING
from .menu import Menu, MenuSelectionType
-from ..locale_helpers import set_keyboard_language
-from ..output import log
+from ..locale import set_keyboard_language
+from ..output import error
from ..translationhandler import TranslationHandler, Language
if TYPE_CHECKING:
@@ -211,7 +210,7 @@ class AbstractMenu:
# TODO: https://stackoverflow.com/questions/28157929/how-to-safely-handle-an-exception-inside-a-context-manager
# TODO: skip processing when it comes from a planified exit
if len(args) >= 2 and args[1]:
- log(args[1], level=logging.ERROR, fg='red')
+ error(args[1])
print(" Please submit this issue (and file) to https://github.com/archlinux/archinstall/issues")
raise args[1]
@@ -483,7 +482,7 @@ class AbstractMenu:
yield item
def _select_archinstall_language(self, preset: Language) -> Language:
- from ..user_interaction.general_conf import select_archinstall_language
+ from ..interactions.general_conf import select_archinstall_language
language = select_archinstall_language(self.translation_handler.translated_languages, preset)
self._translation_handler.activate(language)
return language