[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb/master] 5482 - Do not use integer division



commit 08f7c3434723518156344372008d5074f78de5cc
Author: aagbsn <aagbsn@xxxxxxxx>
Date:   Sun Nov 4 07:24:54 2012 -0800

    5482 - Do not use integer division
    
    These should be floats, not longs
---
 lib/bridgedb/Stability.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/bridgedb/Stability.py b/lib/bridgedb/Stability.py
index a4abcd9..da66141 100644
--- a/lib/bridgedb/Stability.py
+++ b/lib/bridgedb/Stability.py
@@ -12,7 +12,7 @@ import logging
 import bridgedb.Storage
 
 # tunables 
-weighting_factor = long(19)/long(20)
+weighting_factor = float(19)/float(20)
 discountIntervalMillis = long(60*60*12*1000)
 
 class BridgeHistory(object):



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits