[tor-commits] [ooni-probe/master] Use float, else ceil() is meaningless

art at torproject.org art at torproject.org
Tue Jan 8 16:57:39 UTC 2013


commit 28861eca47ce03310d75f68cb13ee834335ce7cb
Author: aagbsn <aagbsn at extc.org>
Date:   Wed Jan 2 18:07:06 2013 +0000

    Use float, else ceil() is meaningless
---
 ooni/inputunit.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ooni/inputunit.py b/ooni/inputunit.py
index 2e80940..fb85d9e 100644
--- a/ooni/inputunit.py
+++ b/ooni/inputunit.py
@@ -38,7 +38,7 @@ class InputUnitFactory(object):
         Returns the number of input units in the input unit factory.
         """
         if not self.length:
-            self.length = ceil(sum(1 for _ in self._inputs)/self.inputUnitSize)
+            self.length = ceil(float(sum(1 for _ in self._inputs))/self.inputUnitSize)
         return self.length
 
     def next(self):





More information about the tor-commits mailing list