refactoring

This commit is contained in:
Devaev Maxim
2020-09-10 09:57:12 +03:00
parent 9cb5582565
commit ec6d13dc34
3 changed files with 16 additions and 9 deletions

View File

@@ -44,6 +44,7 @@ from ....yamlconf import Option
from ....validators.os import valid_abs_dir
from ....validators.os import valid_command
from .... import tools
from .... import aiotools
from .... import aiofs
@@ -169,7 +170,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
"storage": Option("/var/lib/kvmd/msd", type=valid_abs_dir, unpack_as="storage_path"),
"remount_cmd": Option([*sudo, "/usr/bin/kvmd-helper-otgmsd-remount", "{mode}"], type=valid_command),
"unlock_cmd": Option([*sudo, "/usr/bin/kvmd-helper-otgmsd-unlock", "unlock"], type=valid_command),
"sysfs_prefix": Option("", type=(lambda arg: str(arg).strip())),
"sysfs_prefix": Option("", type=tools.str_strip),
}
async def get_state(self) -> Dict: