diff options
Diffstat (limited to 'src/backend/autoremove.py')
-rw-r--r-- | src/backend/autoremove.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/backend/autoremove.py b/src/backend/autoremove.py index 303b314..8dc00ec 100644 --- a/src/backend/autoremove.py +++ b/src/backend/autoremove.py @@ -5,21 +5,26 @@ import io import subprocess import sys import sisyphus.checkenv +import sisyphus.getcolor import sisyphus.killemerge import sisyphus.syncdb def start(): if sisyphus.checkenv.root(): - portageExec = subprocess.Popen(['emerge', '--quiet', '--depclean', '--ask']) + portageExec = subprocess.Popen( + ['emerge', '--quiet', '--depclean', '--ask']) portageExec.wait() sisyphus.syncdb.localTable() else: - sys.exit("\nYou need root permissions to do this, exiting!\n") + print(sisyphus.getcolor.bright_red + + "\nYou need root permissions to do this!\n" + sisyphus.getcolor.reset) + sys.exit() def xstart(): - portageExec = subprocess.Popen(['emerge', '--depclean'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + portageExec = subprocess.Popen( + ['emerge', '--depclean'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) # kill portage if the program dies or it's terminated by the user atexit.register(sisyphus.killemerge.start, portageExec) |