diff options
author | Devaev Maxim <[email protected]> | 2020-10-31 05:19:35 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-10-31 05:19:35 +0300 |
commit | 386461c9746665ef3440fe2c29ec60584d29cbbf (patch) | |
tree | beeb97afc642eec4f31ca680ce9e5e1776f7fbde /kvmd/validators | |
parent | a286cd5ec2166f79c26cda659983858daabccfbd (diff) |
advanced cmd options for streamer
Diffstat (limited to 'kvmd/validators')
-rw-r--r-- | kvmd/validators/os.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kvmd/validators/os.py b/kvmd/validators/os.py index ec8d47fa..67c9b3e1 100644 --- a/kvmd/validators/os.py +++ b/kvmd/validators/os.py @@ -94,8 +94,14 @@ def valid_unix_mode(arg: Any) -> int: return int(valid_number(arg, min=0, name="UNIX mode")) +def valid_options(arg: Any, name: str="") -> List[str]: + if not name: + name = "options" + return valid_string_list(arg, delim=r"[,\t]+", name=name) + + def valid_command(arg: Any) -> List[str]: - cmd = valid_string_list(arg, delim=r"[,\t]+", name="command") + cmd = valid_options(arg, name="command") if len(cmd) == 0: raise_error(arg, "command") cmd[0] = valid_abs_file(cmd[0], name="command entry point") |