Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Girtler <blackrabbit256@gmail.com>2023-05-04 15:23:43 +1000
committerGitHub <noreply@github.com>2023-05-04 07:23:43 +0200
commit9e5d45c5d8762bb9125a153c528957cef9bc7d24 (patch)
tree813eaa9499213d2e68f8f4a357349e823612f775
parent2531a5705004fdb04e6c3de79e8a9079f4a98218 (diff)
Fix 1780 (#1782)
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
-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: