Module: check_mk
Branch: master
Commit: 28298eb47d889689b93e96fd998d78b215713832
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=28298eb47d8896…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Apr 24 13:07:10 2011 +0200
Fix merging of dictionary default levels
Handle the case, where the default levels are not
a dictionary (e.g. possible for filesystem_default_levels)
---
modules/check_mk.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 847a6c1..ec53c54 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -3910,7 +3910,9 @@ def compute_check_parameters(host, checktype, item, params):
# Merge user's default settings onto it
if def_levels_varname in globals():
- new_params.update(eval(def_levels_varname))
+ def_levels = eval(def_levels_varname)
+ if type(def_levels) == dict:
+ new_params.update(eval(def_levels_varname))
# Merge params from inventory onto it
new_params.update(params)