diff options
Diffstat (limited to 'src/backend/autoremove.py')
-rw-r--r-- | src/backend/autoremove.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/backend/autoremove.py b/src/backend/autoremove.py index 5bf47ed..b5b732f 100644 --- a/src/backend/autoremove.py +++ b/src/backend/autoremove.py @@ -3,9 +3,12 @@ import subprocess import sisyphus.check import sisyphus.database +import sys def start(): - sisyphus.check.root() - portageExec = subprocess.Popen(['emerge', '--quiet', '--depclean', '--ask']) - portageExec.wait() - sisyphus.database.syncLocal() + if sisyphus.check.root() == 0: + portageExec = subprocess.Popen(['emerge', '--quiet', '--depclean', '--ask']) + portageExec.wait() + sisyphus.database.syncLocal() + else: + sys.exit("\nYou need root permissions to do this, exiting!\n") |