diff options
Diffstat (limited to 'kvmd/apps/vnc/vncauth.py')
-rw-r--r-- | kvmd/apps/vnc/vncauth.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kvmd/apps/vnc/vncauth.py b/kvmd/apps/vnc/vncauth.py index 06420ee0..b8283cca 100644 --- a/kvmd/apps/vnc/vncauth.py +++ b/kvmd/apps/vnc/vncauth.py @@ -25,10 +25,10 @@ import dataclasses from typing import Tuple from typing import Dict -import aiofiles - from ...logging import get_logger +from ... import aiofs + # ===== class VncAuthError(Exception): @@ -64,8 +64,7 @@ class VncAuthManager: return ({}, (not self.__enabled)) async def __inner_read_credentials(self) -> Dict[str, VncAuthKvmdCredentials]: - async with aiofiles.open(self.__path) as vc_file: - lines = (await vc_file.read()).split("\n") + lines = (await aiofs.read(self.__path)).split("\n") credentials: Dict[str, VncAuthKvmdCredentials] = {} for (lineno, line) in enumerate(lines): |