summaryrefslogtreecommitdiff
path: root/kvmd/aiotools.py
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-05-28 11:03:49 +0300
committerDevaev Maxim <[email protected]>2020-05-28 11:03:49 +0300
commit1c93f6a562d1c2106d148cebb128397989fb84fd (patch)
tree8065e45b9a07004b5823d8f57a3272796aeb2704 /kvmd/aiotools.py
parentfbdfb009a1f752236eeacc8c2528167a64d5d3a8 (diff)
refactoring
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()