diff options
author | Devaev Maxim <[email protected]> | 2020-05-29 17:03:41 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-05-29 17:03:41 +0300 |
commit | 3389dbe0481515b6625359c17105a27cb8dfa93a (patch) | |
tree | b5b4d7abaac60747777244b005f63a8274955e7c /kvmd/apps/otgmsd | |
parent | ef8b6cfda56aa2474fde00c8e94ea0a3dafa3e0d (diff) |
refactoring
Diffstat (limited to 'kvmd/apps/otgmsd')
-rw-r--r-- | kvmd/apps/otgmsd/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/apps/otgmsd/__init__.py b/kvmd/apps/otgmsd/__init__.py index 2e7122ac..a9891f0e 100644 --- a/kvmd/apps/otgmsd/__init__.py +++ b/kvmd/apps/otgmsd/__init__.py @@ -31,7 +31,7 @@ from typing import Optional import psutil from ...validators.basic import valid_bool -from ...validators.basic import valid_number +from ...validators.basic import valid_int_f0 from ...validators.os import valid_abs_file @@ -90,7 +90,7 @@ def main(argv: Optional[List[str]]=None) -> None: description="KVMD OTG-MSD low-level hand tool", parents=[parent_parser], ) - parser.add_argument("-i", "--instance", default=0, type=(lambda arg: valid_number(arg, min=0)), + parser.add_argument("-i", "--instance", default=0, type=valid_int_f0, metavar="<N>", help="Drive instance (0 for KVMD drive)") parser.add_argument("--unlock", action="store_true", help="Send SIGUSR1 to MSD kernel thread") |