Updated for ponce

This commit is contained in:
Dimitris Zlatanidis 2023-03-05 10:32:54 +02:00
parent 4c4f7e34e1
commit dcf850da0b

View file

@ -25,7 +25,7 @@ class Downloader(Configs, Utilities):
self.color = self.colour() self.color = self.colour()
self.progress = ProgressBar() self.progress = ProgressBar()
self.output = 0 self.output: int = 0
self.stderr = None self.stderr = None
self.stdout = None self.stdout = None
@ -57,8 +57,6 @@ class Downloader(Configs, Utilities):
def check_if_downloaded(self) -> None: def check_if_downloaded(self) -> None:
""" Checks if the file downloaded. """ """ Checks if the file downloaded. """
if 'ponce' not in self.url:
url: str = unquote(self.url) url: str = unquote(self.url)
file: str = url.split('/')[-1] file: str = url.split('/')[-1]
path_file = Path(self.path, file) path_file = Path(self.path, file)
@ -91,8 +89,8 @@ class Downloader(Configs, Utilities):
if not p1.is_alive(): if not p1.is_alive():
if p1.exitcode != 0: if p1.exitcode != 0:
done = f' {self.bred} Failed{self.endc}' done: str = f' {self.bred} Failed{self.endc}'
self.output = p1.exitcode self.output: int = p1.exitcode
print(f'{self.endc}{done}', end='') print(f'{self.endc}{done}', end='')
p2.terminate() p2.terminate()