mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
removed aiofs
This commit is contained in:
@@ -26,7 +26,6 @@ import asyncio
|
||||
import ssl
|
||||
import functools
|
||||
import types
|
||||
|
||||
import typing
|
||||
|
||||
from typing import Callable
|
||||
@@ -35,9 +34,17 @@ from typing import Coroutine
|
||||
from typing import TypeVar
|
||||
from typing import Any
|
||||
|
||||
import aiofiles
|
||||
|
||||
from .logging import get_logger
|
||||
|
||||
|
||||
# =====
|
||||
async def read_file(path: str) -> str:
|
||||
async with aiofiles.open(path) as file:
|
||||
return (await file.read())
|
||||
|
||||
|
||||
# =====
|
||||
def run(coro: Coroutine, final: (Coroutine | None)=None) -> None:
|
||||
# https://github.com/aio-libs/aiohttp/blob/a1d4dac1d/aiohttp/web.py#L515
|
||||
|
||||
Reference in New Issue
Block a user