diff options
author | Devaev Maxim <[email protected]> | 2020-05-29 04:33:35 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-05-29 04:33:35 +0300 |
commit | cf5bf8e14732e7c0bdc67a08a0e410b81b2d4572 (patch) | |
tree | 32a0b872b8bf21d5b69e7686ba55ca0f85e50e3f /kvmd/aiotools.py | |
parent | eb13da03be9f52954755930def2bfdf57fb6347c (diff) |
refactoring
Diffstat (limited to 'kvmd/aiotools.py')
-rw-r--r-- | kvmd/aiotools.py | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/kvmd/aiotools.py b/kvmd/aiotools.py index 15aa5b9c..d790158d 100644 --- a/kvmd/aiotools.py +++ b/kvmd/aiotools.py @@ -20,7 +20,6 @@ # ========================================================================== # -import os import asyncio import asyncio.queues import functools @@ -39,9 +38,6 @@ from typing import TypeVar from typing import Optional from typing import Any -import aiofiles -import aiofiles.base - from .logging import get_logger @@ -94,13 +90,6 @@ async def wait_first(*aws: Awaitable) -> Tuple[Set[asyncio.Future], Set[asyncio. # ===== -async def afile_write_now(afile: aiofiles.base.AiofilesContextManager, data: bytes) -> None: - await afile.write(data) - await afile.flush() - await run_async(os.fsync, afile.fileno()) - - -# ===== class AioNotifier: def __init__(self) -> None: self.__queue: asyncio.queues.Queue = asyncio.Queue() |