X-Git-Url: https://git.harvie.cz/?p=svn%2FPrometheus-QoS%2F.git;a=blobdiff_plain;f=optional-tools%2Fhosts-ping.py;fp=optional-tools%2Fhosts-ping.py;h=b7afd7f330d6cc7a38d00b6e72337f3c44a84a53;hp=ca1919644c6b98de81d50b1cf4cfef13a9ba01a2;hb=e2107a5e5a89245332653d3ac2274b131ab66c60;hpb=001b232cc7ea03976bb72baf8d952c151f53138f 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))