Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/installer.py
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib/installer.py')
-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: