Skip to content

Commit

Permalink
reformat task.py
Browse files Browse the repository at this point in the history
  • Loading branch information
C0D3D3V committed May 1, 2024
1 parent eb5a7b6 commit b272b34
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions moodle_dl/downloader/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,9 @@ async def get_head_infos(self, dl_url: str) -> HeadInfo:
@return: If download should be aborted then None; else HeadInfo
"""
ssl_context = SslHelper.get_ssl_context(
self.opts.global_opts.skip_cert_verify, self.opts.global_opts.allow_insecure_ssl, self.opts.global_opts.use_all_ciphers
self.opts.global_opts.skip_cert_verify,
self.opts.global_opts.allow_insecure_ssl,
self.opts.global_opts.use_all_ciphers,
)
async with aiohttp.ClientSession(cookie_jar=self.get_cookie_jar(), raise_for_status=True) as session:
try:
Expand Down Expand Up @@ -819,7 +821,9 @@ async def download_url(self, dl_url: str, dest_path: str, timeout: int = None):
file_obj = None
headers = self.RQ_HEADER.copy()
ssl_context = SslHelper.get_ssl_context(
self.opts.global_opts.skip_cert_verify, self.opts.global_opts.allow_insecure_ssl, self.opts.global_opts.use_all_ciphers
self.opts.global_opts.skip_cert_verify,
self.opts.global_opts.allow_insecure_ssl,
self.opts.global_opts.use_all_ciphers,
)
with Timer() as watch:
async with aiohttp.ClientSession(cookie_jar=self.get_cookie_jar(), raise_for_status=True) as session:
Expand Down

0 comments on commit b272b34

Please sign in to comment.