mypy again

This commit is contained in:
Devaev Maxim
2020-10-13 14:55:08 +03:00
parent c6524fc7ac
commit 6420bc4533
5 changed files with 20 additions and 19 deletions

View File

@@ -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):