Module: check_mk
Branch: master
Commit: e05356cff58d3018cdc7a2b60c66b4d84a817c14
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e05356cff58d30…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 28 15:48:55 2017 +0100
4416 FIX check_form_submit: added documented but missing --help argument
Change-Id: Id7f11547d639b2ff2f4ad8d33af4cedc1aec8f11
---
.werks/4416 | 11 +++++++++++
active_checks/check_form_submit | 5 +++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/4416 b/.werks/4416
new file mode 100644
index 0000000..5ef1f18
--- /dev/null
+++ b/.werks/4416
@@ -0,0 +1,11 @@
+Title: check_form_submit: added documented but missing --help argument
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1488293307
+
+
diff --git a/active_checks/check_form_submit b/active_checks/check_form_submit
index 3b27a73..66280cf 100755
--- a/active_checks/check_form_submit
+++ b/active_checks/check_form_submit
@@ -78,9 +78,10 @@ OPTIONS:
""")
short_options = 'I:u:p:H:f:q:e:t:n:sd'
+long_options = [ "help" ]
try:
- opts, args = getopt.getopt(sys.argv[1:], short_options)
+ opts, args = getopt.getopt(sys.argv[1:], short_options, long_options)
except getopt.GetoptError, err:
sys.stderr.write("%s\n" % err)
sys.exit(1)
@@ -100,7 +101,7 @@ num_warn = None
num_crit = None
for o,a in opts:
- if o == '-h':
+ if o in [ '-h', '--help' ]:
usage()
sys.exit(0)
elif o == '-I':