mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-16 07:47:35 +01:00
Fix for the update message
This commit is contained in:
parent
50c99c469a
commit
571b87bded
3 changed files with 8 additions and 10 deletions
|
@ -1,10 +1,13 @@
|
|||
## slpkg - ChangeLog
|
||||
|
||||
### 5.0.0 - 15/03/2024
|
||||
### 5.0.0 - 16/03/2024
|
||||
- Updated:
|
||||
* Remove SQLAlchemy dependency
|
||||
* Remove help command, instead use manpage
|
||||
|
||||
- Bugfixes:
|
||||
* Double view message when update repositories
|
||||
|
||||
### 4.9.8 - 14/02/2024
|
||||
- Added:
|
||||
* python urllib3 settings to the config file (slpkg.toml)
|
||||
|
|
|
@ -42,6 +42,7 @@ class CheckUpdates(Configs):
|
|||
else:
|
||||
self.check_updates_for_repositories()
|
||||
|
||||
self.view_messages(self.compare)
|
||||
return self.compare
|
||||
|
||||
def check_updates_for_repositories(self) -> None:
|
||||
|
@ -103,10 +104,6 @@ class CheckUpdates(Configs):
|
|||
# https://urllib3.readthedocs.io/en/stable/advanced-usage.html#socks-proxies
|
||||
self.http = SOCKSProxyManager(f'{self.proxy_address}', headers=self.proxy_default_headers)
|
||||
|
||||
def check_for_updates(self) -> None:
|
||||
self.check_the_repositories()
|
||||
self.view_messages(self.compare)
|
||||
|
||||
def view_messages(self, compare: dict) -> None:
|
||||
print()
|
||||
repo_for_update: list = []
|
||||
|
@ -115,8 +112,8 @@ class CheckUpdates(Configs):
|
|||
repo_for_update.append(repo)
|
||||
|
||||
if repo_for_update:
|
||||
print(f"\n{self.endc}There are new updates available for the "
|
||||
f"repositories: \n")
|
||||
print(f"\n{self.bgreen}There are new updates available for the "
|
||||
f"repositories:{self.endc}\n")
|
||||
for repo in repo_for_update:
|
||||
repo_length: int = max(len(name) for name in repo_for_update)
|
||||
print(f'> {self.bgreen}{repo:<{repo_length}}{self.endc} Last Updated: '
|
||||
|
@ -128,7 +125,7 @@ class CheckUpdates(Configs):
|
|||
message: str = 'Checking for news, please wait...'
|
||||
|
||||
# Starting multiprocessing
|
||||
process_1 = Process(target=self.check_for_updates)
|
||||
process_1 = Process(target=self.check_the_repositories)
|
||||
process_2 = Process(target=self.progress.progress_bar, args=(message,))
|
||||
|
||||
process_1.start()
|
||||
|
|
|
@ -651,8 +651,6 @@ class UpdateRepositories(Configs):
|
|||
|
||||
def check_for_updates(self, queue) -> dict:
|
||||
compare: dict = self.check_updates.check_the_repositories()
|
||||
self.check_updates.view_messages(compare)
|
||||
|
||||
return queue.put(compare)
|
||||
|
||||
def repositories(self) -> None:
|
||||
|
|
Loading…
Reference in a new issue