From b272b3426cb17d2486c56556d5392919e1bcddc4 Mon Sep 17 00:00:00 2001 From: c0d3d3v Date: Wed, 1 May 2024 19:36:54 +0200 Subject: [PATCH] reformat task.py --- moodle_dl/downloader/task.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/moodle_dl/downloader/task.py b/moodle_dl/downloader/task.py index e39b4c0..f1c32e5 100644 --- a/moodle_dl/downloader/task.py +++ b/moodle_dl/downloader/task.py @@ -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: @@ -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: