Module: check_mk
Branch: master
Commit: 1fc1686b33e700d3006abb9656911b11d429bbaa
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1fc1686b33e700…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 17 10:59:02 2018 +0100
Fixed "ValueError: max() arg is an empty sequence" introduced yesterday when
doing omd stop/start while having no site
Change-Id: Id1c6ec5c8fedee68ccfd43239d86259faff489e8
---
omd/packages/omd/omd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/omd/packages/omd/omd b/omd/packages/omd/omd
index b7261f8..ef3f0ea 100644
--- a/omd/packages/omd/omd
+++ b/omd/packages/omd/omd
@@ -3259,7 +3259,7 @@ def main_init_action(command, args, options={}):
bare = "bare" in options
parallel = "parallel" in options
- max_site_len = max([ len(site_id) for site_id in all_sites() ])
+ max_site_len = max([ 8 ] + [ len(site_id) for site_id in all_sites() ])
def parallel_output(site_id, line):
sys.stdout.write(("%-"+str(max_site_len)+"s - %s") %
(site_id, line))