From d9376439b10e2a144909a5b5fe5931f6ba28d505 Mon Sep 17 00:00:00 2001 From: Adrian Date: Wed, 26 Mar 2014 13:37:32 +0100 Subject: [PATCH] Ping: packet loss should be a float --- mininet/net.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mininet/net.py b/mininet/net.py index 55bb1c8..ae1634c 100755 --- a/mininet/net.py +++ b/mininet/net.py @@ -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 ) )