From: Oleg Broytman Date: Thu, 15 Aug 2024 21:59:06 +0000 (+0300) Subject: Refactor(bkmk_raiohttp): Remove unused values X-Git-Tag: 5.7.0~12 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=98445351ac1b1be5b8d809c9f142b36fcb1b1f6c;p=bookmarks_db.git Refactor(bkmk_raiohttp): Remove unused values --- 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)