Module: check_mk
Branch: master
Commit: 28a1c0adccfbb4978dfa4003dfa0065e3e9506a5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=28a1c0adccfbb4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Sep 20 09:24:49 2016 +0200
werks: small refactoring (write ack file with tempfile now)
---
web/htdocs/werks.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/werks.py b/web/htdocs/werks.py
index 8d58e75..a4829f7 100644
--- a/web/htdocs/werks.py
+++ b/web/htdocs/werks.py
@@ -31,6 +31,7 @@ import defaults, config, os, table
import re
from lib import *
from valuespec import *
+import cmk.store as store
acknowledgement_path = defaults.var_dir + "/acknowledged_werks.mk"
@@ -203,7 +204,7 @@ def acknowledge_werks(werks):
def save_acknowledgements(acknowledged_werks):
- file(acknowledgement_path, "w").write("%r\n" %
acknowledged_werks)
+ store.save_file(acknowledgement_path, "%r\n" % acknowledged_werks)
def acknowledge_all_werks():