next-share: fix peer logging speed print
authorRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Tue, 21 Sep 2010 09:18:03 +0000 (11:18 +0200)
committerRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Tue, 21 Sep 2010 09:18:09 +0000 (11:18 +0200)
Print double decimal speed. Replace 1000 (int) with 1000.0 (float).

instrumentation/next-share/BaseLib/Tools/cmdlinedl.py

index a000f51..eddac2b 100644 (file)
@@ -92,7 +92,7 @@ def state_callback(ds):
             for item in peerlist:
                 print >>sys.stderr, \
                         '[ ip: %s, dl: %.2fKB/s, ul: %.2fKB/s ]' % \
-                        (item['ip'], item['downrate']/1000, item['uprate']/1000),
+                        (item['ip'], item['downrate']/1000.0, item['uprate']/1000.0),
         print >>sys.stderr
 
     return (1.0, peer_logging)