Module: check_mk
Branch: master
Commit: 1d9f6c501f79959fd387c7df5e2726530f335640
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1d9f6c501f7995…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jul 2 09:47:36 2014 +0200
Better error message for empty cmk --donate
---
modules/check_mk.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 22b912e..8eb9257 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -5034,6 +5034,10 @@ def do_donation():
for f in cache_files:
if f == host or f.startswith("%s." % host):
donate.append(f)
+ if not donate:
+ sys.stderr.write("No hosts specified. You need to set donation_hosts in
main.mk.\n")
+ sys.exit(1)
+
if opt_verbose:
print "Donating files %s" % " ".join(cache_files)
import base64