Merge pull request #565 from dylanmtaylor/patch-1
Exit codes are an 8 bit value and could be 0 through 255
This commit is contained in:
commit
d3dddcf425
|
|
@ -31,9 +31,8 @@ def list_interfaces(skip_loopback=True):
|
||||||
def check_mirror_reachable():
|
def check_mirror_reachable():
|
||||||
if (exit_code := SysCommand("pacman -Sy").exit_code) == 0:
|
if (exit_code := SysCommand("pacman -Sy").exit_code) == 0:
|
||||||
return True
|
return True
|
||||||
elif exit_code == 256:
|
elif os.geteuid() != 0:
|
||||||
if os.geteuid() != 0:
|
log("check_mirror_reachable() uses 'pacman -Sy' which requires root.", level=logging.ERROR, fg="red")
|
||||||
log("check_mirror_reachable() uses 'pacman -Sy' which requires root.", level=logging.ERROR, fg="red")
|
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue