Module: check_mk
Branch: master
Commit: 87fd6532b7f9db365c4e18fdfdce5916ae28d593
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=87fd6532b7f9db…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Mar 7 16:15:37 2016 +0100
Removed compatibility code (sorted is available since 2.4, 2.3 is not supported anymore)
---
web/htdocs/lib.py | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/web/htdocs/lib.py b/web/htdocs/lib.py
index cfcb124..aa58e0a 100644
--- a/web/htdocs/lib.py
+++ b/web/htdocs/lib.py
@@ -154,26 +154,19 @@ def write_settings_file(path, content):
data = repr(content)
create_user_file(path, "w").write(data + "\n")
+
def remove_user_file(path):
path = path.encode("utf-8")
if os.path.exists(path):
os.remove(path)
+
def savefloat(f):
try:
return float(f)
except:
return 0.0
-# sorted() is not available in all Python versions
-try:
- sorted
-except:
- def sorted(l):
- a = l[:]
- a.sort()
- return a
-
def make_utf8(x):
if type(x) == unicode: