Skip to content
Snippets Groups Projects
Commit ebac6784 authored by lantz's avatar lantz
Browse files

Merge pull request #293 from backb1/patch/pingloss

Ping: packet loss should be a float
parents d718bb72 d9376439
No related branches found
No related tags found
No related merge requests found
......@@ -507,7 +507,7 @@ def ping( self, hosts=None, timeout=None ):
output( ( '%s ' % dest.name ) if received else 'X ' )
output( '\n' )
if packets > 0:
ploss = 100 * lost / packets
ploss = float(100) * lost / packets
received = packets - lost
output( "*** Results: %i%% dropped (%d/%d received)\n" %
( ploss, received, packets ) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment