Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.pre-commit-config.yaml2
-rw-r--r--archinstall/lib/installer.py11
2 files changed, 6 insertions, 7 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 87128289..002defbb 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -38,5 +38,5 @@ repos:
rev: v1.1.1
hooks:
- id: mypy
- args: [--config=mypy.ini]
+ args: [--config=pyproject.toml]
fail_fast: true
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index 72ec534c..c51019fd 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -392,8 +392,8 @@ class Installer:
pacman_conf.write(line)
def _pacstrap(self, packages: Union[str, List[str]]) -> bool:
- if type(packages[0]) in (list, tuple):
- packages = packages[0]
+ if isinstance(packages, str):
+ packages = [packages]
for plugin in plugins.values():
if hasattr(plugin, 'on_pacstrap'):
@@ -568,13 +568,12 @@ class Installer:
self.enable_service("fstrim.timer")
def enable_service(self, services: Union[str, List[str]]) -> None:
- if type(services[0]) in (list, tuple):
- services = services[0]
- if type(services) == str:
- services = [services, ]
+ if isinstance(services, str):
+ services = [services]
for service in services:
self.log(f'Enabling service {service}', level=logging.INFO)
+
try:
self.arch_chroot(f'systemctl enable {service}')
except SysCallError as error: