Module: check_mk
Branch: master
Commit: fc9b487e3c28d9e513dec13c3bca58ac86adf06d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fc9b487e3c28d9…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 22 10:59:37 2011 +0100
Revert "FIX: Broken WATO hooks lead to empty htpasswd file"
This reverts commit c888f7e593f72ed6fc67ecee46c98edadca7b065.
---
ChangeLog | 4 +++-
web/htdocs/wato.py | 12 ------------
2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fe50be1..0ebfcfc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,11 +6,13 @@
* linux agent - ipmi: Creating directory of cache file if not exists
* dell_powerconnect_cpu: renamed service from CPU to "CPU utilization", in
order to be consistent with other checks
+
+ Multisite:
+ * FIX: ship missing CSS files for mobile GUI
Multisite:
* Several cleanups to prevent css/js warning messages in e.g. Firefox
* Made texts in selectable rows selectable again
- * FIX: ship missing CSS files for mobile GUI
WATO:
* Optimized wraps in host lists tag column
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index d638998..ea83557 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -673,7 +673,6 @@ def save_hosts(folder = None):
# values stored for check_mk as well.
out.write("\n# Host attributes (needed for WATO)\n")
out.write("host_attributes.update(\n%s)\n" %
pprint.pformat(cleaned_hosts))
- out.close()
def delete_configuration_file(folder, thefile):
@@ -5268,7 +5267,6 @@ def save_configuration_vars(vars, filename):
out.write("# Written by WATO\n# encoding: utf-8\n\n")
for varname, value in vars.items():
out.write("%s = %r\n" % (varname, value))
- out.close()
#.
# .-Groups---------------------------------------------------------------.
@@ -5484,7 +5482,6 @@ def save_group_information(groups):
if what in groups and len(groups[what]) > 0:
out.write("if type(define_%sgroups) != dict:\n define_%sgroups =
{}\n" % (what, what))
out.write("define_%sgroups.update(%s)\n\n" % (what,
pprint.pformat(groups[what])))
- out.close()
class GroupSelection(ElementSelection):
@@ -5619,7 +5616,6 @@ def save_timeperiods(timeperiods):
out = file(root_dir + "timeperiods.mk", "w")
out.write("# Written by WATO\n# encoding: utf-8\n\n")
out.write("timeperiods.update(%s)\n" % pprint.pformat(timeperiods))
- out.close()
def mode_edit_timeperiod(phase):
@@ -6449,7 +6445,6 @@ def save_sites(sites):
out = file(sites_mk, "w")
out.write("# Written by WATO\n# encoding: utf-8\n\n")
out.write("sites = \\\n%s\n" % pprint.pformat(sites))
- out.close()
update_distributed_wato_file(sites)
need_sidebar_reload()
@@ -7033,7 +7028,6 @@ def create_distributed_wato_file(siteid, mode):
"# push the configuration to us. It makes sure that\n"
"# we only monitor hosts that are assigned to our site.\n\n")
out.write("distributed_wato_site = '%s'\n" % siteid)
- out.close()
def delete_distributed_wato_file():
p = defaults.check_mk_configdir + "/distributed_wato.mk"
@@ -7632,7 +7626,6 @@ def save_users(profiles):
out = file(filename, "w")
out.write("# Written by WATO\n# encoding: utf-8\n\n")
out.write("contacts.update(\n%s\n)\n" % pprint.pformat(contacts))
- out.close()
# Users with passwords for Multisite
make_nagios_directory(multisite_dir)
@@ -7640,7 +7633,6 @@ def save_users(profiles):
out = file(filename, "w")
out.write("# Written by WATO\n# encoding: utf-8\n\n")
out.write("multisite_users = \\\n%s\n" % pprint.pformat(users))
- out.close()
# Apache htpasswd. We only store passwords here. During
# loading we created entries for all admin users we know. Other
@@ -7665,7 +7657,6 @@ def save_users(profiles):
create_user_file(auth_file, "w").write("%s\n" %
user["automation_secret"])
elif os.path.exists(auth_file):
os.remove(auth_file)
- out.close()
# Call the users_saved hook
call_hook(call_hook_users_saved, users)
@@ -7982,7 +7973,6 @@ def save_roles(roles):
out = file(filename, "w")
out.write("# Written by WATO\n# encoding: utf-8\n\n")
out.write("roles.update(\n%s)\n" % pprint.pformat(roles))
- out.close()
call_hook(call_hook_roles_saved, roles)
@@ -8353,7 +8343,6 @@ def save_hosttags(hosttags):
out = file(multisite_dir + "hosttags.mk", "w")
out.write("# Written by WATO\n# encoding: utf-8\n\n")
out.write("wato_host_tags += \\\n%s\n" % pprint.pformat(hosttags))
- out.close()
def rename_host_tags_after_confirmation(tag_id, operations):
mode = html.var("_repair")
@@ -9591,7 +9580,6 @@ def save_rulesets(folder, rulesets):
for rule in ruleset:
save_rule(out, folder, rulespec, rule)
out.write("]\n\n")
- out.close()
def save_rule(out, folder, rulespec, rule):
out.write(" ( ")