Module: check_mk
Branch: master
Commit: 1447e5c5ad22d87743cc8d048930d0a6f911a1e9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1447e5c5ad22d8…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jun 23 14:05:28 2011 +0200
Make --profile also work in --automation mode
---
modules/automation.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules/automation.py b/modules/automation.py
index 298fa97..7cdd140 100644
--- a/modules/automation.py
+++ b/modules/automation.py
@@ -52,6 +52,7 @@ def do_automation(cmd, args):
sys.stderr.write("%s\n" % e)
if opt_debug:
raise
+ output_profile()
sys.exit(1)
except Exception, e:
@@ -59,6 +60,7 @@ def do_automation(cmd, args):
raise
else:
sys.stderr.write("%s\n" % e)
+ output_profile()
sys.exit(2)
if opt_debug:
@@ -66,6 +68,7 @@ def do_automation(cmd, args):
sys.stdout.write(pprint.pformat(result)+"\n")
else:
sys.stdout.write("%r\n" % (result,))
+ output_profile()
sys.exit(0)
# Does inventory for *one* host. Possible values for how: