From 0563d307e84498d124a34638d04d3fd5bc09878c Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Thu, 10 Jun 2021 06:53:05 -0400 Subject: Exit codes are an 8 bit value and could be 0 through 255 We also don't need to check the exit code - this message should just be displayed if we are not root --- archinstall/lib/networking.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'archinstall') diff --git a/archinstall/lib/networking.py b/archinstall/lib/networking.py index 2c261334..49970ec4 100644 --- a/archinstall/lib/networking.py +++ b/archinstall/lib/networking.py @@ -31,9 +31,8 @@ def list_interfaces(skip_loopback=True): def check_mirror_reachable(): if (exit_code := SysCommand("pacman -Sy").exit_code) == 0: return True - elif exit_code == 256: - if os.geteuid() != 0: - log("check_mirror_reachable() uses 'pacman -Sy' which requires root.", level=logging.ERROR, fg="red") + elif os.geteuid() != 0: + log("check_mirror_reachable() uses 'pacman -Sy' which requires root.", level=logging.ERROR, fg="red") return False -- cgit v1.2.3-70-g09d2