Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
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 /archinstall/lib
parent2531a5705004fdb04e6c3de79e8a9079f4a98218 (diff)
Fix 1780 (#1782)
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/installer.py11
1 files changed, 5 insertions, 6 deletions
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: