Module: check_mk
Branch: master
Commit: c838a5bd516094ceb031da29fe7c263c91f36bf1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c838a5bd516094…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 17 14:02:45 2017 +0100
5528 FIX Fixed showing help when executing "omd" without mode argument (1.4.0p18
regression)
With 1.4.0p18 the output of the help text when executing the "omd" command
without argument
broke. It printed an exception instead of the help text. As workaround you can execute
"omd help" to get the help text.
Change-Id: I2097d475037fc7d9c288376f232fa1e7eb8501a4
---
.werks/5528 | 12 ++++++++++++
omd/packages/omd/omd | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/5528 b/.werks/5528
new file mode 100644
index 0000000..70598f4
--- /dev/null
+++ b/.werks/5528
@@ -0,0 +1,12 @@
+Title: Fixed showing help when executing "omd" without mode argument (1.4.0p18
regression)
+Level: 1
+Component: omd
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1510923599
+Class: fix
+
+With 1.4.0p18 the output of the help text when executing the "omd" command
without argument
+broke. It printed an exception instead of the help text. As workaround you can execute
+"omd help" to get the help text.
diff --git a/omd/packages/omd/omd b/omd/packages/omd/omd
index edd16cc..9091cec 100644
--- a/omd/packages/omd/omd
+++ b/omd/packages/omd/omd
@@ -31,7 +31,7 @@
# python libraries. Newer versions unset these variables before, so this
# additional execv() is only needed when updating from older versions.
import os, sys
-if sys.argv[1] == "update" and sys.version_info[2] != 14:
+if len(sys.argv) > 1 and sys.argv[1] == "update" and sys.version_info[2] !=
14:
# Prevent inheriting environment variables from this versions/site environment
# into the execed omd call. The OMD call must import the python version related
# modules and libaries. This only works when PYTHONPATH and LD_LIBRARY_PATH are