[omd-commits] OMD Git: omd: omd: fix exception in start script if no site exists
git version control
git at mathias-kettner.de
Wed Jul 2 10:58:39 CEST 2014
Module: omd
Branch: master
Commit: 049ddb8245c54432e0f8f2c7c7527b6a3890a480
URL: http://omdistro.org/projects/omd/repository/revisions/049ddb8245c54432e0f8f2c7c7527b6a3890a480
Author: Mathias Kettner <mk at mathias-kettner.de>
Date: Wed Jul 2 10:58:35 2014 +0200
Commiter: Mathias Kettner <mk at mathias-kettner.de>
Date: Wed Jul 2 10:58:35 2014 +0200
omd: fix exception in start script if no site exists
---
packages/omd/omd | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/packages/omd/omd b/packages/omd/omd
index f95b894..45f0531 100644
--- a/packages/omd/omd
+++ b/packages/omd/omd
@@ -2885,8 +2885,10 @@ def main_init_action(command, args, options={}):
# one other site has state 0 (running) or 2 (partially running).
if 1 in exit_states and (0 in exit_states or 2 in exit_states):
exit_status = 2 # not all sites running, but at least one
- else:
+ elif exit_states:
exit_status = max(exit_states)
+ else:
+ exit_status = 0 # No OMD site existing
else:
exit_status = init_action(command, args, options)
sys.exit(exit_status)
More information about the omd-commits
mailing list