Updated for inheritance classes

This commit is contained in:
Dimitris Zlatanidis 2023-01-17 12:02:26 +02:00
parent a03a1c6b56
commit 47438eaae6

View file

@ -14,17 +14,16 @@ from slpkg.check_updates import CheckUpdates
from slpkg.models.models import session as Session
class UpdateRepository:
class UpdateRepository(Configs):
""" Deletes and install the data. """
def __init__(self, flags: list):
super(Configs, self).__init__()
self.flags = flags
self.configs = Configs
self.colors = self.configs.colour
self.color = self.colors()
self.endc = self.color['endc']
self.session = Session
self.progress = ProgressBar()
self.color = self.colour()
self.endc = self.color['endc']
def sbo(self):
""" Updated the sbo repository. """
@ -33,17 +32,17 @@ class UpdateRepository:
view.question()
print('Updating the package list...\n')
self.delete_file(self.configs.sbo_repo_path, self.configs.sbo_txt)
self.delete_file(self.configs.sbo_repo_path, self.configs.sbo_chglog_txt)
self.delete_file(self.sbo_repo_path, self.sbo_txt)
self.delete_file(self.sbo_repo_path, self.sbo_chglog_txt)
self.delete_sbo_data()
slackbuilds_txt = f'{self.configs.sbo_repo_url}/{self.configs.sbo_txt}'
changelog_txt = f'{self.configs.sbo_repo_url}/{self.configs.sbo_chglog_txt}'
slackbuilds_txt = f'{self.sbo_repo_url}/{self.sbo_txt}'
changelog_txt = f'{self.sbo_repo_url}/{self.sbo_chglog_txt}'
down_slackbuilds = Downloader(self.configs.sbo_repo_path, slackbuilds_txt, self.flags)
down_slackbuilds = Downloader(self.sbo_repo_path, slackbuilds_txt, self.flags)
down_slackbuilds.download()
down_changelog = Downloader(self.configs.sbo_repo_path, changelog_txt, self.flags)
down_changelog = Downloader(self.sbo_repo_path, changelog_txt, self.flags)
down_changelog.download()
data = CreateData()