Fixed print view

This commit is contained in:
Dimitris Zlatanidis 2020-02-14 12:51:09 +01:00
parent 6c3f50668e
commit 6c026f9023

View file

@ -53,11 +53,10 @@ class BlackList:
def listed(self):
"""Print blacklist packages
"""
print("\nPackages in the blacklist:\n")
print("Packages in the blacklist:\n")
for black in self.get_black():
if black:
print(f"{self.green}{black}{self.endc}")
print()
def add(self, pkgs):
"""Add blacklist packages if not exist
@ -70,7 +69,6 @@ class BlackList:
if pkg not in blacklist:
print(f"{self.green}{pkg}{self.endc}")
black_conf.write(pkg + "\n")
print()
def remove(self, pkgs):
"""Remove packages from blacklist
@ -81,5 +79,4 @@ class BlackList:
if line not in pkgs:
remove.write(line + "\n")
else:
print(f"{self.red}{line}{self.endc}")
print()
print(f"{self.red}{line}{self.endc}")