[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Use float, else ceil() is meaningless
commit 28861eca47ce03310d75f68cb13ee834335ce7cb
Author: aagbsn <aagbsn@xxxxxxxx>
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):
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits