Skip to content

Commit

Permalink
fixup! Every requests should comply with proxy settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
funilrys committed Jan 21, 2024
1 parent ae0e5f0 commit 0f018fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion PyFunceble/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
from typing import List

import PyFunceble.storage
import PyFunceble.facility
from PyFunceble.checker.availability.domain import DomainAvailabilityChecker
from PyFunceble.checker.availability.domain_and_ip import DomainAndIPAvailabilityChecker
from PyFunceble.checker.availability.ip import IPAvailabilityChecker
Expand Down
5 changes: 5 additions & 0 deletions PyFunceble/downloader/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import datetime
import os
from typing import Optional
import importlib

import PyFunceble.downloader.exceptions
import PyFunceble.exceptions
Expand All @@ -72,6 +73,7 @@ class DownloaderBase:
the download mechanism but also the generation or update of that JSON file.
"""


DOWNTIME_INDEX: Optional[str] = None
"""
Used to set/track the download time of the current file.
Expand Down Expand Up @@ -275,13 +277,16 @@ def start(self) -> None:
Starts the download process.
"""


if self.authorized and self.is_last_download_expired():
if not hasattr(self, "destination") or not self.destination:
raise PyFunceble.downloader.exceptions.NoDownloadDestinationGiven()

if not hasattr(self, "download_link") or not self.download_link:
raise PyFunceble.downloader.exceptions.NoDownloadLinkGiven()

importlib.import_module("PyFunceble.factory")

if DownloadHelper(
self.download_link, session=PyFunceble.factory.Requester
).download_text(destination=self.destination):
Expand Down

0 comments on commit 0f018fe

Please sign in to comment.