float() %
[svn/Prometheus-QoS/.git] / optional-tools / hosts-ping.py
index ca1919644c6b98de81d50b1cf4cfef13a9ba01a2..b7afd7f330d6cc7a38d00b6e72337f3c44a84a53 100755 (executable)
@@ -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(   ('<tr class="%s"><td style="%s">%d</td><td><a href="%s" target="_blank" class="blue">%s</a></td><td style="%s">%.1f%%</td>' + "\n")
               % (('even', 'odd')[counter % 2], style['right'], counter, base_url % (host['name'], host['smokename']), host['name'], style['loss'], loss))
 
This page took 0.099045 seconds and 4 git commands to generate.