summaryrefslogtreecommitdiff
path: root/kvmd/aiotools.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/aiotools.py')
-rw-r--r--kvmd/aiotools.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/kvmd/aiotools.py b/kvmd/aiotools.py
index 6f76423e..15aa5b9c 100644
--- a/kvmd/aiotools.py
+++ b/kvmd/aiotools.py
@@ -39,8 +39,6 @@ from typing import TypeVar
from typing import Optional
from typing import Any
-import aiohttp
-
import aiofiles
import aiofiles.base
@@ -96,20 +94,6 @@ async def wait_first(*aws: Awaitable) -> Tuple[Set[asyncio.Future], Set[asyncio.
# =====
-def raise_not_200(response: aiohttp.ClientResponse) -> None:
- if response.status != 200:
- assert response.reason is not None
- response.release()
- raise aiohttp.ClientResponseError(
- response.request_info,
- response.history,
- status=response.status,
- message=response.reason,
- headers=response.headers,
- )
-
-
-# =====
async def afile_write_now(afile: aiofiles.base.AiofilesContextManager, data: bytes) -> None:
await afile.write(data)
await afile.flush()