Bugfix stderr output

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2022-05-08 17:44:03 +03:00
parent d972a665fd
commit c3e169682a

View file

@ -35,7 +35,6 @@ class Updates:
self.repo = repo
self.meta = _meta_
self.green = _meta_.color["GREEN"]
self.grey = _meta_.color["GREY"]
self.endc = _meta_.color["ENDC"]
self.msg = Msg()
self.check = 2
@ -78,13 +77,11 @@ class Updates:
try:
self.check = self.all_repos[self.repo]()
except OSError:
usage(self.repo)
raise SystemExit()
usage(self.repo, 1)
elif self.repo in self.meta.repositories:
self.check = self._init.custom(self.repo)
else:
usage(self.repo)
raise SystemExit()
usage(self.repo, 1)
self.status_bar()
self.status()
self.print_status(self.repo)
@ -99,8 +96,7 @@ class Updates:
try:
self.check = self.all_repos[repo]()
except OSError:
usage(self.repo)
raise SystemExit()
usage(self.repo, 1)
elif repo in self.meta.repositories:
self.check = self._init.custom(repo)
self.status()
@ -132,5 +128,5 @@ class Updates:
cmd = "Repository is updated."
if self.count_news > 0:
cmd = "Run the command 'slpkg update'."
print(f"{self.grey}From {self.count_repo} repositories need"
f" {self.count_news} updating. {cmd}{self.endc}", end="\n")
print(f"From {self.count_repo} repositories need"
f" {self.count_news} updating. {cmd}", end="\n")