Module: check_mk
Branch: master
Commit: 248da6ccc6dca14d0a6f702adfa73d0e1958999e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=248da6ccc6dca1…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Sep 9 14:42:12 2014 +0200
create config: now catches exceptions in agent bakery
---
modules/check_mk.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 70815fc..6c1b1c3 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -4879,8 +4879,13 @@ def do_create_config():
if bake_agents_on_restart and 'do_bake_agents' in globals():
sys.stdout.write("Baking agents...")
sys.stdout.flush()
- do_bake_agents()
- sys.stdout.write(tty_ok + "\n")
+ try:
+ do_bake_agents()
+ sys.stdout.write(tty_ok + "\n")
+ except Exception, e:
+ if opt_debug:
+ raise
+ sys.stdout.write("Error: %s\n" % e)
def do_output_nagios_conf(args):