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-10-18 16:57:44 +1100
committerGitHub <noreply@github.com>2023-10-18 16:57:44 +1100
commitce9828c2934937217daee6ba178dafedf6cabe6d (patch)
tree0c9540f07c6756426e50786a04b4436ef3b51577 /archinstall/lib
parent8117c0eed8cdeffc542026a82a51cb10fd6c1ec4 (diff)
Fixes for prev PR (#2175)
* Fixes for prev PR * Update --------- Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/exceptions.py16
-rw-r--r--archinstall/lib/networking.py15
2 files changed, 9 insertions, 22 deletions
diff --git a/archinstall/lib/exceptions.py b/archinstall/lib/exceptions.py
index 53458d2c..80926e0b 100644
--- a/archinstall/lib/exceptions.py
+++ b/archinstall/lib/exceptions.py
@@ -4,19 +4,19 @@ if TYPE_CHECKING:
from .general import SysCommandWorker
-class RequirementError(BaseException):
+class RequirementError(Exception):
pass
-class DiskError(BaseException):
+class DiskError(Exception):
pass
-class UnknownFilesystemFormat(BaseException):
+class UnknownFilesystemFormat(Exception):
pass
-class SysCallError(BaseException):
+class SysCallError(Exception):
def __init__(self, message :str, exit_code :Optional[int] = None, worker :Optional['SysCommandWorker'] = None) -> None:
super(SysCallError, self).__init__(message)
self.message = message
@@ -24,17 +24,17 @@ class SysCallError(BaseException):
self.worker = worker
-class HardwareIncompatibilityError(BaseException):
+class HardwareIncompatibilityError(Exception):
pass
-class ServiceException(BaseException):
+class ServiceException(Exception):
pass
-class PackageError(BaseException):
+class PackageError(Exception):
pass
-class Deprecated(BaseException):
+class Deprecated(Exception):
pass
diff --git a/archinstall/lib/networking.py b/archinstall/lib/networking.py
index 2a086f39..fb26bd3d 100644
--- a/archinstall/lib/networking.py
+++ b/archinstall/lib/networking.py
@@ -8,7 +8,7 @@ from urllib.parse import urlencode
from urllib.request import urlopen
from .exceptions import SysCallError
-from .output import error, info, debug
+from .output import error, info
from .pacman import Pacman
@@ -32,19 +32,6 @@ def list_interfaces(skip_loopback :bool = True) -> Dict[str, str]:
return interfaces
-def check_mirror_reachable() -> bool:
- info("Testing connectivity to the Arch Linux mirrors...")
- try:
- Pacman.run("-Sy")
- return True
- except SysCallError as err:
- if os.geteuid() != 0:
- error("check_mirror_reachable() uses 'pacman -Sy' which requires root.")
- debug(f'exit_code: {err.exit_code}, Error: {err.message}')
-
- return False
-
-
def update_keyring() -> bool:
info("Updating archlinux-keyring ...")
try: