mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-18 10:26:29 +01:00
Fixed print view
This commit is contained in:
parent
6c3f50668e
commit
6c026f9023
1 changed files with 2 additions and 5 deletions
|
@ -53,11 +53,10 @@ class BlackList:
|
||||||
def listed(self):
|
def listed(self):
|
||||||
"""Print blacklist packages
|
"""Print blacklist packages
|
||||||
"""
|
"""
|
||||||
print("\nPackages in the blacklist:\n")
|
print("Packages in the blacklist:\n")
|
||||||
for black in self.get_black():
|
for black in self.get_black():
|
||||||
if black:
|
if black:
|
||||||
print(f"{self.green}{black}{self.endc}")
|
print(f"{self.green}{black}{self.endc}")
|
||||||
print()
|
|
||||||
|
|
||||||
def add(self, pkgs):
|
def add(self, pkgs):
|
||||||
"""Add blacklist packages if not exist
|
"""Add blacklist packages if not exist
|
||||||
|
@ -70,7 +69,6 @@ class BlackList:
|
||||||
if pkg not in blacklist:
|
if pkg not in blacklist:
|
||||||
print(f"{self.green}{pkg}{self.endc}")
|
print(f"{self.green}{pkg}{self.endc}")
|
||||||
black_conf.write(pkg + "\n")
|
black_conf.write(pkg + "\n")
|
||||||
print()
|
|
||||||
|
|
||||||
def remove(self, pkgs):
|
def remove(self, pkgs):
|
||||||
"""Remove packages from blacklist
|
"""Remove packages from blacklist
|
||||||
|
@ -82,4 +80,3 @@ class BlackList:
|
||||||
remove.write(line + "\n")
|
remove.write(line + "\n")
|
||||||
else:
|
else:
|
||||||
print(f"{self.red}{line}{self.endc}")
|
print(f"{self.red}{line}{self.endc}")
|
||||||
print()
|
|
Loading…
Reference in a new issue