Commit c6d0211a authored by Benjamin Winger's avatar Benjamin Winger

Replaced usages of colour in with green, red, lgreen etc. when possible

parent 19552c8b
......@@ -14,6 +14,10 @@ def lred(text):
return "{}{}{}".format(Fore.LIGHTRED_EX, text, Style.RESET_ALL)
def red(text):
return "{}{}{}".format(Fore.RED, text, Style.RESET_ALL)
def lgreen(text):
return "{}{}{}".format(Fore.LIGHTGREEN_EX, text, Style.RESET_ALL)
......@@ -31,7 +31,7 @@ from portmod.repo.util import select_mod, KeywordDep, LicenseDep, get_hash
from portmod.config import find_config, check_config_subdirs, read_config
from portmod.repo.sets import add_set, get_set, remove_set
from portmod.repo.keywords import add_keyword
from portmod.colour import colour, green
from portmod.colour import colour, green, lgreen, red
from portmod.mod import install_mod, remove_mod
from portmod.prompt import prompt_bool
from portmod.importer import import_mod
......@@ -190,7 +190,7 @@ def configure_mods(
if pending_mods is None:
"{}: invalid atom {}".format(
colour(Fore.RED, "ERROR"), colour(Fore.GREEN, mod)
red("ERROR"), green(mod)
......@@ -215,7 +215,7 @@ def configure_mods(
'trying to remove mod "{}", which is not actually installed. Skipping...'.format(
colour(Fore.GREEN, atom)
elif installed is not None and installed.ATOM == to_install.ATOM:
......@@ -257,7 +257,7 @@ def configure_mods(
c = Fore.YELLOW
" {} {}".format(
colour(Fore.GREEN, keyword.atom), colour(c, keyword.keyword)
green(keyword.atom), colour(c, keyword.keyword)
......@@ -276,7 +276,7 @@ def configure_mods(
for license in license_changes:
" {} {}".format(
colour(Fore.GREEN, license.atom), colour(c, license.license)
green(license.atom), colour(c, license.license)
......@@ -374,10 +374,10 @@ def configure_mods(
if len(get_set("rebuild")) > 0:
warn("The following mods need to be rebuilt:")
for atom in get_set("rebuild"):
print(" {}".format(colour(Fore.GREEN, atom)))
print(" {}".format(green(atom)))
"Use {} to rebuild these mods".format(
colour(Fore.LIGHTGREEN_EX, "mwmerge @rebuild")
lgreen("mwmerge @rebuild")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment