Module: check_mk
Branch: master
Commit: 82eb21cce345349ee6bcf84329f576805f453339
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=82eb21cce34534…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue May 24 15:50:10 2011 +0200
WATO: no pending log after deletion of empty file
---
web/htdocs/wato.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 42bfa1b..2bd9527 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -1875,7 +1875,10 @@ def delete_file_after_confirm(del_file):
hosts = read_configuration_file(g_folder, del_file)
for delname in hosts:
check_mk_automation("delete-host", [delname])
- log_pending(del_file, "delete-file", "Deleted file %s" %
del_file["title"])
+ if len(hosts) > 0:
+ log_pending(del_file, "delete-file", _("Deleted file %s")
% del_file["title"])
+ else:
+ log_audit(del_file, "delete-file", _("Deleted empty file
%s") % del_file["title"])
del g_files[del_file["path"]]
del g_folder["files"][del_file["name"]]
delete_configuration_file(g_folder, del_file)