🥅 Exception handling (#290)

This commit is contained in:
Nikhil Badyal
2023-08-17 21:09:42 +05:30
committed by GitHub
parent 5bffa4c79c
commit 02e550585c
11 changed files with 105 additions and 35 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ from tqdm import tqdm
from src.config import RevancedConfig
from src.downloader.utils import implement_method
from src.exceptions import PatchingFailed
from src.exceptions import DownloadFailure
from src.patches import Patches
from src.utils import handle_github_response
@@ -37,7 +37,7 @@ class Downloader(object):
def _download(self, url: str, file_name: str) -> None:
if not url:
raise PatchingFailed("No download to download")
raise DownloadFailure("No url provided to download")
if self.file_status_check(
self.config.temp_folder.joinpath(file_name), self.config.dry_run, url
):