Module: check_mk
Branch: master
Commit: 9df93c4a0ff1a959e7ce38233f395a7b4db9c743
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9df93c4a0ff1a9…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Feb 16 15:56:02 2018 +0100
Moved savefloat() next to saveint()
Change-Id: I3bf1ffde88fabc65210051fbac46df1a444139ef
---
web/htdocs/lib.py | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/web/htdocs/lib.py b/web/htdocs/lib.py
index 139858e..ac82440 100644
--- a/web/htdocs/lib.py
+++ b/web/htdocs/lib.py
@@ -33,15 +33,6 @@ import cmk.paths
from log import logger
-# TODO: Remove this helper function. Replace with explicit checks and covnersion
-# in using code.
-def savefloat(f):
- try:
- return float(f)
- except:
- return 0.0
-
-
def make_utf8(x):
if type(x) == unicode:
return x.encode('utf-8')
@@ -144,6 +135,7 @@ def pnp_cleanup(s):
.replace('/', '_') \
.replace('\\', '_')
+
# Quote string for use as arguments on the shell
# TODO: Move to Check_MK library
def quote_shell_string(s):
@@ -155,6 +147,16 @@ def log_exception(msg=None):
msg = _('Internal error')
logger.error("%s %s: %s" % (html.request_uri(), msg,
traceback.format_exc()))
+
+# TODO: Remove this helper function. Replace with explicit checks and covnersion
+# in using code.
+def savefloat(f):
+ try:
+ return float(f)
+ except:
+ return 0.0
+
+
# TODO: Remove this helper function. Replace with explicit checks and covnersion
# in using code.
def saveint(x):