summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2025-01-11 21:25:00 +0200
committerMaxim Devaev <[email protected]>2025-01-11 21:26:26 +0200
commite9cbf04ba57d829bbf608508ade9a59681205d94 (patch)
treeca1ed3b34bbe53d371b4c7dd4791f6274720e096
parent3cf543a13eab752ffe3c99f0d03f2b0bde4bbbae (diff)
kvmd-otgmsd: allow to connect all file types
-rw-r--r--kvmd/apps/otgmsd/__init__.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/kvmd/apps/otgmsd/__init__.py b/kvmd/apps/otgmsd/__init__.py
index 7d5bfdbc..a289307f 100644
--- a/kvmd/apps/otgmsd/__init__.py
+++ b/kvmd/apps/otgmsd/__init__.py
@@ -20,13 +20,12 @@
# ========================================================================== #
-import os
import errno
import argparse
from ...validators.basic import valid_bool
from ...validators.basic import valid_int_f0
-from ...validators.os import valid_abs_file
+from ...validators.os import valid_abs_path
from ... import usb
@@ -72,7 +71,7 @@ def main(argv: (list[str] | None)=None) -> None:
metavar="<1|0|yes|no>", help="Set CD-ROM flag")
parser.add_argument("--set-rw", default=None, type=valid_bool,
metavar="<1|0|yes|no>", help="Set RW flag")
- parser.add_argument("--set-image", default=None, type=valid_abs_file,
+ parser.add_argument("--set-image", default=None, type=valid_abs_path,
metavar="<path>", help="Set the image file")
parser.add_argument("--eject", action="store_true",
help="Eject the image")
@@ -97,8 +96,8 @@ def main(argv: (list[str] | None)=None) -> None:
set_param("ro", str(int(not options.set_rw)))
if options.set_image:
- if not os.path.isfile(options.set_image):
- raise SystemExit(f"Not a file: {options.set_image}")
+ # if not os.path.isfile(options.set_image):
+ # raise SystemExit(f"Not a file: {options.set_image}")
set_param("file", options.set_image)
print("Image file: ", (get_param("file") or "<none>"))