Module: check_mk
Branch: master
Commit: edcf0e023dcb8bfb48dcb88186c910ca3f6d1f0b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=edcf0e023dcb8b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 18 16:23:16 2012 +0100
Fixed shortly introduced problem with older python versions where the json module is
missing
---
web/htdocs/wato.py | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 8be9137..c2286a9 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -4001,16 +4001,18 @@ def configure_attributes(hosts, for_what, parent, myself=None,
without_attribute
if topic == topics[-1]:
html.write('<table class="form nomargin">')
+ def dump_json(obj):
+ return repr(obj).replace('None', 'null')
+
# Provide Javascript world with the tag dependency information
# of all attributes.
- import json
html.javascript("var inherited_tags = %s;\n"\
"var wato_depends_on = %s;\n"\
"var volatile_topics = %s;\n"\
"wato_fix_visibility();\n" % (
- json.dumps(inherited_tags),
- json.dumps(dependency_mapping),
- json.dumps(volatile_topics)))
+ dump_json(inherited_tags),
+ dump_json(dependency_mapping),
+ dump_json(volatile_topics)))
# Check if at least one host in a folder (or its subfolders)