Ping: packet loss should be a float

This commit is contained in:
Adrian
2014-03-26 13:37:32 +01:00
parent a6a0cb4331
commit d9376439b1
+1 -1
View File
@@ -504,7 +504,7 @@ class Mininet( object ):
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 ) )