From a71ffe9cd09164182584bb01b3993881f7766dfd Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 18 Aug 2020 12:26:10 +0100 Subject: make sisyphus.check.root more portable, replace it everywhere --- src/backend/check.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/backend/check.py') diff --git a/src/backend/check.py b/src/backend/check.py index a129d36..fb760cc 100644 --- a/src/backend/check.py +++ b/src/backend/check.py @@ -1,13 +1,12 @@ #!/usr/bin/python3 import os -import sys import subprocess import sisyphus.filesystem def root(): - if not os.getuid() == 0: - sys.exit("\nYou need root permissions to do this, exiting!\n") + if os.getuid() == 0: + return 0 def portage(): if os.path.isdir(os.path.join(sisyphus.filesystem.portageRepoDir, '.git')): -- cgit v1.2.3