summaryrefslogtreecommitdiff
path: root/src/backend/setbranch.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-02-06 02:00:37 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-02-06 02:00:37 +0000
commit60acbaac2b8dbe7dc4998f06c794b7372c9d1f44 (patch)
tree36ad5ad2ab4140d4935bd148da3301f58fac86f0 /src/backend/setbranch.py
parentb1014c416b960df3ead2c26da20471537a20ca66 (diff)
backend : setbranch, port to colorama API
Diffstat (limited to 'src/backend/setbranch.py')
-rw-r--r--src/backend/setbranch.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/backend/setbranch.py b/src/backend/setbranch.py
index 8220589..2dd19de 100644
--- a/src/backend/setbranch.py
+++ b/src/backend/setbranch.py
@@ -1,6 +1,7 @@
#!/usr/bin/python3
import animation
+import colorama
import git
import os
import random
@@ -8,12 +9,14 @@ import signal
import sys
import time
import sisyphus.checkenv
-import sisyphus.getclr
import sisyphus.getfs
import sisyphus.purgeenv
import sisyphus.setjobs
import sisyphus.setmirror
import sisyphus.setprofile
+from colorama import Fore, Back, Style
+
+colorama.init()
brch_rmt_map = {
@@ -134,8 +137,10 @@ def set_bhst_index(branch, remote, gfx_ui=False):
print(f"\nThe active branch has been switched to '{branch}'")
print(f"\nThe active remote has been switched to '{remote}'")
else:
- print(f"{sisyphus.getclr.green}\nThe active branch has been switched to '{branch}'{sisyphus.getclr.reset}")
- print(f"{sisyphus.getclr.green}\nThe active remote has been switched to '{remote}'{sisyphus.getclr.reset}")
+ print(
+ f"{Fore.GREEN}\nThe active branch has been switched to '{branch}'{Style.RESET_ALL}")
+ print(
+ f"{Fore.GREEN}\nThe active remote has been switched to '{remote}'{Style.RESET_ALL}")
if "master" in branch:
set_brch_master_index()
@@ -156,7 +161,7 @@ def start(branch, remote, gfx_ui=False):
os.kill(os.getpid(), signal.SIGTERM) # kill GUI window
else:
print(
- f"{sisyphus.getclr.bright_red}\nNo internet connection detected; Aborting!\n{sisyphus.getclr.reset}")
+ f"{Fore.RED}{Style.BRIGHT}\nNo internet connection detected; Aborting!\n{Style.RESET_ALL}")
sys.exit()
else:
if gfx_ui: