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

aagbsn at torproject.org aagbsn at torproject.org
Wed Apr 17 00:26:44 UTC 2013


commit 08f7c3434723518156344372008d5074f78de5cc
Author: aagbsn <aagbsn at extc.org>
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):





More information about the tor-commits mailing list