mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
switch
This commit is contained in:
@@ -45,6 +45,11 @@ async def read_file(path: str) -> str:
|
||||
return (await file.read())
|
||||
|
||||
|
||||
async def write_file(path: str, text: str) -> None:
|
||||
async with aiofiles.open(path, "w") as file:
|
||||
await file.write(text)
|
||||
|
||||
|
||||
# =====
|
||||
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