diff options
author | Devaev Maxim <[email protected]> | 2020-10-13 14:55:08 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-10-13 14:55:08 +0300 |
commit | 6420bc4533490af85a33d026c120d28a7f55a044 (patch) | |
tree | 6b787e07eef6d5de3a2b6058d70615eabb0a97c0 /kvmd/apps/vnc/vncauth.py | |
parent | c6524fc7ac3a271a91fef994a9a9529940337596 (diff) |
mypy again
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): |