summaryrefslogtreecommitdiff
path: root/src/backend/update.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-04 22:10:33 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-04 22:10:33 +0000
commit99455bbb94f298cd101c3e43227647ccf7aaaf1b (patch)
tree6e1d079bc2a051592d64e5fd1a73b3ea6c2d0123 /src/backend/update.py
parent1965c85d0acc683e1dddb58cec343b2ff62711e4 (diff)
add an aditional matchphrase to the dependency solver, add color support && pep8 the whole backendv4.2212.0
Diffstat (limited to 'src/backend/update.py')
-rw-r--r--src/backend/update.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/backend/update.py b/src/backend/update.py
index a60c597..856ecd0 100644
--- a/src/backend/update.py
+++ b/src/backend/update.py
@@ -4,6 +4,7 @@ import animation
import sys
import time
import sisyphus.checkenv
+import sisyphus.getcolor
import sisyphus.getenv
import sisyphus.purgeenv
import sisyphus.syncdb
@@ -28,10 +29,13 @@ def start():
syncAll()
else:
if "packages-next" in binhostURL:
- print("\nCurrent branch: '" + activeBranch + "' (stable)" + "\nCurrent binhost: '" + binhostURL + "' (testing)")
+ print(sisyphus.getcolor.green + "\n\nActive branch:" + " " + sisyphus.getcolor.reset + "'" + activeBranch + "'" + " " + "(stable)" +
+ " " + sisyphus.getcolor.green + "\nActive binhost:" + " " + sisyphus.getcolor.reset + "'" + binhostURL + "'" + " " + "(testing)")
else:
- print("\nCurrent branch: '" + activeBranch + "' (testing)" + "\nCurrent binhost: '" + binhostURL + "' (stable)")
- sys.exit("\nInvalid branch - binhost pairing; Use 'sisyphus branch --help' for help; Quitting.")
+ print(sisyphus.getcolor.green + "\n\nActive branch:" + " " + sisyphus.getcolor.reset + "'" + activeBranch + "'" + " " + "(testing)" +
+ " " + sisyphus.getcolor.green + "\nActive binhost:" + " " + sisyphus.getcolor.reset + "'" + binhostURL + "'" + " " + "(stable)")
+ sys.exit(sisyphus.getcolor.bright_red + "\n\nInvalid configuration!" + sisyphus.getcolor.reset + sisyphus.getcolor.bright_yellow +
+ "\nUse" + sisyphus.getcolor.reset + " " + "'" + "sisyphus branch --help" + "'" + " " + sisyphus.getcolor.bright_yellow + "for help" + sisyphus.getcolor.reset)
def xstart():
@@ -43,10 +47,13 @@ def xstart():
syncAll()
else:
if "packages-next" in binhostURL:
- print("\nCurrent branch: '" + activeBranch + "' (stable)" + "\nCurrent binhost: '" + binhostURL + "' (testing)")
+ print("\n\nActive branch:" + " " + "'" + activeBranch + "'" + " " + "(stable)" +
+ "\nActive binhost:" + " " + "'" + binhostURL + "'" + " " + "(testing)")
else:
- print("\nCurrent branch: '" + activeBranch + "' (testing)" + "\nCurrent binhost: '" + binhostURL + "' (stable)")
- print("\nInvalid branch - binhost pairing; Use 'sisyphus branch --help' for help; Quitting in 10 seconds.\n")
+ print("\n\nActive branch:" + " " + "'" + activeBranch + "'" + " " + "(testing)" +
+ "\nActive binhost:" + " " + "'" + binhostURL + "'" + " " + "(stable)")
+ print("\n\nInvalid configuration!" +
+ "\nUse 'sisyphus branch --help' for help\n")
t = int(10)
while t:
mins, secs = divmod(t, 60)
@@ -54,5 +61,4 @@ def xstart():
print(timer, end="\r")
time.sleep(1)
t -= 1
-
sys.exit()