summaryrefslogtreecommitdiff
path: root/kvmd/apps/otgmsd/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/apps/otgmsd/__init__.py')
-rw-r--r--kvmd/apps/otgmsd/__init__.py4
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")