Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/disk.py2
-rw-r--r--archinstall/lib/general.py3
-rw-r--r--archinstall/lib/networking.py4
-rw-r--r--archinstall/lib/systemd.py9
4 files changed, 10 insertions, 8 deletions
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py
index 44f2742b..8f67111a 100644
--- a/archinstall/lib/disk.py
+++ b/archinstall/lib/disk.py
@@ -266,7 +266,7 @@ class Partition:
files = len(glob.glob(f"{temporary_mountpoint}/*"))
iterations = 0
- while SysCommand(f"/usr/bin/umount -R {temporary_mountpoint}").exit_code != 0 and (iterations := iterations+1) < 10:
+ while SysCommand(f"/usr/bin/umount -R {temporary_mountpoint}").exit_code != 0 and (iterations := iterations + 1) < 10:
time.sleep(1)
temporary_path.rmdir()
diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py
index 65c83484..cec3891a 100644
--- a/archinstall/lib/general.py
+++ b/archinstall/lib/general.py
@@ -360,7 +360,8 @@ def prerequisite_check():
def reboot():
o = b''.join(SysCommand("/usr/bin/reboot"))
-def pid_exists(pid :int):
+
+def pid_exists(pid: int):
try:
return any(subprocess.check_output(['/usr/bin/ps', '--no-headers', '-o', 'pid', '-p', str(pid)]).strip())
except subprocess.CalledProcessError:
diff --git a/archinstall/lib/networking.py b/archinstall/lib/networking.py
index fdeefb84..eb11a47e 100644
--- a/archinstall/lib/networking.py
+++ b/archinstall/lib/networking.py
@@ -1,14 +1,14 @@
import fcntl
-import os
import logging
+import os
import socket
import struct
from collections import OrderedDict
from .exceptions import *
from .general import SysCommand
-from .storage import storage
from .output import log
+from .storage import storage
def get_hw_addr(ifname):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
diff --git a/archinstall/lib/systemd.py b/archinstall/lib/systemd.py
index e64ff7e0..383f1f17 100644
--- a/archinstall/lib/systemd.py
+++ b/archinstall/lib/systemd.py
@@ -5,6 +5,7 @@ from .installer import Installer
from .output import log
from .storage import storage
+
class Ini:
def __init__(self, *args, **kwargs):
"""
@@ -103,7 +104,7 @@ class Boot:
return self.session.is_alive()
- def SysCommand(self, cmd :list, *args, **kwargs):
+ def SysCommand(self, cmd: list, *args, **kwargs):
if cmd[0][0] != '/' and cmd[0][:2] != './':
# This check is also done in SysCommand & SysCommandWorker.
# However, that check is done for `machinectl` and not for our chroot command.
@@ -113,8 +114,8 @@ class Boot:
return SysCommand(["machinectl", "shell", self.container_name, *cmd], *args, **kwargs)
- def SysCommandWorker(self, cmd :list, *args, **kwargs):
+ def SysCommandWorker(self, cmd: list, *args, **kwargs):
if cmd[0][0] != '/' and cmd[0][:2] != './':
cmd[0] = locate_binary(cmd[0])
-
- return SysCommandWorker(["machinectl", "shell", self.container_name, *cmd], *args, **kwargs) \ No newline at end of file
+
+ return SysCommandWorker(["machinectl", "shell", self.container_name, *cmd], *args, **kwargs)