fix error handling in util.math.add_tuples
[p2pool.git] / p2pool / util / math.py
index 00567e8..4940cc8 100644 (file)
@@ -134,7 +134,7 @@ class Object(object):
 def add_tuples(res, *tuples):
     for t in tuples:
         if len(t) != len(res):
-            print 'tuples must all be the same length'
+            raise ValueError('tuples must all be the same length')
         res = tuple(a + b for a, b in zip(res, t))
     return res