diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-03-01 11:37:04 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-03-01 11:37:04 +0000 |
commit | d81c5e5ffd727a4a0e00910b93eb17737d8f8193 (patch) | |
tree | 2d18957c3954948c0db6a4a70c0c1a41197c1564 /src/backend/setbranch.py | |
parent | 5a8384b21bb066ca44f6823871ad1d0aa1aa2c28 (diff) |
rewrite the print statements in a more concise and professional wayv6.2403.0
Diffstat (limited to 'src/backend/setbranch.py')
-rw-r--r-- | src/backend/setbranch.py | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/backend/setbranch.py b/src/backend/setbranch.py index 4763b60..adff88a 100644 --- a/src/backend/setbranch.py +++ b/src/backend/setbranch.py @@ -97,16 +97,12 @@ def set_brch_next_index(): def set_bhst_index(branch, remote): if "master" in branch: - print(sisyphus.getclr.green + "\nActive branch switched:" + - " " + sisyphus.getclr.reset + "'" + branch + "'") - print(sisyphus.getclr.green + "Active remote switched:" + - " " + sisyphus.getclr.reset + "'" + remote + "'") + print(f"{sisyphus.getclr.green}\nThe active branch has been switched to '{branch}'{sisyphus.getclr.reset}") + print(f"{sisyphus.getclr.green}The active remote has been switched to '{remote}'{sisyphus.getclr.reset}") set_brch_master_index() # Set binhost index for branch 'master' (random odd index) elif "next" in branch: - print(sisyphus.getclr.green + "\nActive branch switched:" + - " " + sisyphus.getclr.reset + "'" + branch + "'") - print(sisyphus.getclr.green + "Active remote switched:" + - " " + sisyphus.getclr.reset + "'" + remote + "'") + print(f"{sisyphus.getclr.green}\nThe active branch has been switched to '{branch}'{sisyphus.getclr.reset}") + print(f"{sisyphus.getclr.green}The active remote has been switched to '{remote}'{sisyphus.getclr.reset}") set_brch_next_index() # Set binhost index for branch 'next' (random even index) @@ -124,10 +120,9 @@ def start(branch, remote): sisyphus.setprofile.start() set_bhst_index(branch, remote) else: - print(sisyphus.getclr.bright_red + - "\nNo internet connection; Aborting!\n" + sisyphus.getclr.reset) + print( + f"{sisyphus.getclr.bright_red}\nNo internet connection detected; Aborting!\n{sisyphus.getclr.reset}") sys.exit() else: - print(sisyphus.getclr.bright_red + - "\nYou need root permissions to do this!\n" + sisyphus.getclr.reset) + print(f"{sisyphus.getclr.bright_red}\nRoot permissions are required to perform this action.\n{sisyphus.getclr.reset}") sys.exit() |