Fix 1780 (#1782)
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
This commit is contained in:
parent
2531a57050
commit
9e5d45c5d8
|
|
@ -38,5 +38,5 @@ repos:
|
||||||
rev: v1.1.1
|
rev: v1.1.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: mypy
|
- id: mypy
|
||||||
args: [--config=mypy.ini]
|
args: [--config=pyproject.toml]
|
||||||
fail_fast: true
|
fail_fast: true
|
||||||
|
|
|
||||||
|
|
@ -392,8 +392,8 @@ class Installer:
|
||||||
pacman_conf.write(line)
|
pacman_conf.write(line)
|
||||||
|
|
||||||
def _pacstrap(self, packages: Union[str, List[str]]) -> bool:
|
def _pacstrap(self, packages: Union[str, List[str]]) -> bool:
|
||||||
if type(packages[0]) in (list, tuple):
|
if isinstance(packages, str):
|
||||||
packages = packages[0]
|
packages = [packages]
|
||||||
|
|
||||||
for plugin in plugins.values():
|
for plugin in plugins.values():
|
||||||
if hasattr(plugin, 'on_pacstrap'):
|
if hasattr(plugin, 'on_pacstrap'):
|
||||||
|
|
@ -568,13 +568,12 @@ class Installer:
|
||||||
self.enable_service("fstrim.timer")
|
self.enable_service("fstrim.timer")
|
||||||
|
|
||||||
def enable_service(self, services: Union[str, List[str]]) -> None:
|
def enable_service(self, services: Union[str, List[str]]) -> None:
|
||||||
if type(services[0]) in (list, tuple):
|
if isinstance(services, str):
|
||||||
services = services[0]
|
services = [services]
|
||||||
if type(services) == str:
|
|
||||||
services = [services, ]
|
|
||||||
|
|
||||||
for service in services:
|
for service in services:
|
||||||
self.log(f'Enabling service {service}', level=logging.INFO)
|
self.log(f'Enabling service {service}', level=logging.INFO)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.arch_chroot(f'systemctl enable {service}')
|
self.arch_chroot(f'systemctl enable {service}')
|
||||||
except SysCallError as error:
|
except SysCallError as error:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue