Merge pull request #293 from backb1/patch/pingloss

Ping: packet loss should be a float
This commit is contained in:
lantz
2014-04-01 11:45:06 -07:00
+1 -1
View File
@@ -507,7 +507,7 @@ class Mininet( object ):
output( ( '%s ' % dest.name ) if received else 'X ' ) output( ( '%s ' % dest.name ) if received else 'X ' )
output( '\n' ) output( '\n' )
if packets > 0: if packets > 0:
ploss = 100 * lost / packets ploss = float(100) * lost / packets
received = packets - lost received = packets - lost
output( "*** Results: %i%% dropped (%d/%d received)\n" % output( "*** Results: %i%% dropped (%d/%d received)\n" %
( ploss, received, packets ) ) ( ploss, received, packets ) )