Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/models/bootloader.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/models/bootloader.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/models/bootloader.py')
-rw-r--r--archinstall/lib/models/bootloader.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/archinstall/lib/models/bootloader.py b/archinstall/lib/models/bootloader.py
index 38254c99..e21cda33 100644
--- a/archinstall/lib/models/bootloader.py
+++ b/archinstall/lib/models/bootloader.py
@@ -1,12 +1,11 @@
from __future__ import annotations
-import logging
import sys
from enum import Enum
from typing import List
-from ..hardware import has_uefi
-from ..output import log
+from ..hardware import SysInfo
+from ..output import warn
class Bootloader(Enum):
@@ -23,7 +22,7 @@ class Bootloader(Enum):
@classmethod
def get_default(cls) -> Bootloader:
- if has_uefi():
+ if SysInfo.has_uefi():
return Bootloader.Systemd
else:
return Bootloader.Grub
@@ -35,6 +34,6 @@ class Bootloader(Enum):
if bootloader not in cls.values():
values = ', '.join(cls.values())
- log(f'Invalid bootloader value "{bootloader}". Allowed values: {values}', level=logging.WARN)
+ warn(f'Invalid bootloader value "{bootloader}". Allowed values: {values}')
sys.exit(1)
return Bootloader(bootloader)