[X2Go-Commits] [pyhoca-cli] 04/05: pyhoca-cli: Do input check on value passed in via the --link option.
git-admin at x2go.org
git-admin at x2go.org
Thu Aug 19 17:04:02 CEST 2021
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository pyhoca-cli.
commit 3633dc423ce1d38ec458a0dbef0c1d2717287806
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Thu Aug 19 16:20:44 2021 +0200
pyhoca-cli: Do input check on value passed in via the --link option.
---
pyhoca-cli | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pyhoca-cli b/pyhoca-cli
index 19f0263..8f9a061 100755
--- a/pyhoca-cli
+++ b/pyhoca-cli
@@ -419,6 +419,11 @@ Possible values for the --pack NX option are:
if a.kbd_type == 'auto':
a.kbd_layout = 'null'
+ # input check for --link
+ a.link = a.link.lower()
+ if a.link not in ('modem', 'isdn', 'adsl', 'wan','lan'):
+ runtime_error ("value for cmd line argument --link is not any of 'modem', 'isdn', 'adsl', 'wan' or 'lan'", parser=p, exitcode=1)
+
# input check for --clipboard-mode
a.clipboard_mode = a.clipboard_mode.lower()
if a.clipboard_mode not in ('none', 'both', 'client', 'server'):
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pyhoca-cli.git
More information about the x2go-commits
mailing list