From 98445351ac1b1be5b8d809c9f142b36fcb1b1f6c Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 16 Aug 2024 00:59:06 +0300 Subject: [PATCH] Refactor(bkmk_raiohttp): Remove unused values --- Robots/bkmk_raiohttp.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Robots/bkmk_raiohttp.py b/Robots/bkmk_raiohttp.py index e94d72a..44f4cf7 100644 --- a/Robots/bkmk_raiohttp.py +++ b/Robots/bkmk_raiohttp.py @@ -27,7 +27,7 @@ class robot_aiohttp(robot_base): def get(self, bookmark, url, accept_charset=False, use_proxy=False): if url.startswith('ftp://'): - error, _, _, body = asyncio.run(get_ftp( + error, body = asyncio.run(_get_ftp( url, connect_timeout=self.connect_timeout, timeout=self.timeout, )) @@ -79,7 +79,7 @@ async def get_http(url, headers={}, proxy=None, connect_timeout=30, timeout=60): return e, None, None, None -async def get_ftp(url, connect_timeout=30, timeout=60): +async def _get_ftp(url, connect_timeout=30, timeout=60): split_results = urlsplit(url) path = split_results.path or '/' user = split_results.username or 'anonymous' @@ -96,5 +96,5 @@ async def get_ftp(url, connect_timeout=30, timeout=60): async for _path, _info in client.list(path, recursive=True): lines.append('%s %s' % (_info, _path)) except (OSError, aioftp.errors.AIOFTPException) as e: - return e, None, None, None - return None, None, None, '\n'.join(lines) + return e, None + return None, '\n'.join(lines) -- 2.39.5