From e2107a5e5a89245332653d3ac2274b131ab66c60 Mon Sep 17 00:00:00 2001 From: xchaos Date: Wed, 8 May 2013 22:29:31 +0000 Subject: [PATCH] float() % git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@226 251d49ef-1d17-4917-a970-b30cf55b089b --- optional-tools/hosts-ping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optional-tools/hosts-ping.py b/optional-tools/hosts-ping.py index ca19196..b7afd7f 100755 --- a/optional-tools/hosts-ping.py +++ b/optional-tools/hosts-ping.py @@ -95,7 +95,7 @@ def append_host(html, host, base_url, counter, red_treshold, green_treshold): elif host[column] < green_treshold[kolikaty]: style[column] += ' color: green;' - loss = 100*host['loss']/host['attempts'] + loss = float(100*host['loss'])/host['attempts'] html.write( ('%d%s%.1f%%' + "\n") % (('even', 'odd')[counter % 2], style['right'], counter, base_url % (host['name'], host['smokename']), host['name'], style['loss'], loss)) -- 2.30.2