Updated for colors

This commit is contained in:
Dimitris Zlatanidis 2023-03-14 21:08:50 +02:00
parent b563a6908b
commit 7025e912b6

View file

@ -116,19 +116,19 @@ class NewConfig:
""" Copy tne slpkg.toml.new file and rename the old to .orig. """
if self.slpkg_config.is_file():
shutil.copy(self.slpkg_config, f"{self.slpkg_config}.orig")
print(f"\ncp {self.slpkg_config} -> {self.slpkg_config}.orig")
print(f"\ncp {self.green}{self.slpkg_config}{self.endc} -> {self.slpkg_config}.orig")
shutil.move(self.slpkg_config_new, self.slpkg_config)
print(f"mv {self.slpkg_config_new} -> {self.slpkg_config}")
print(f"mv {self.slpkg_config_new} -> {self.green}{self.slpkg_config}{self.endc}")
def overwrite_blacklist_file(self):
""" Copy tne blacklist.toml.new file and rename the old to .orig. """
if self.blacklist_config.is_file():
shutil.copy(self.blacklist_config, f"{self.blacklist_config}.orig")
print(f"\ncp {self.blacklist_config} -> {self.blacklist_config}.orig")
print(f"\ncp {self.green}{self.blacklist_config}{self.endc} -> {self.blacklist_config}.orig")
shutil.move(self.blacklist_config_new, self.blacklist_config)
print(f"mv {self.blacklist_config_new} -> {self.blacklist_config}")
print(f"mv {self.blacklist_config_new} -> {self.green}{self.blacklist_config}{self.endc}")
def remove(self):
""" Removes the .new files. """