Skip to content

Commit 735a0f4

Browse files
committed
fix for issue #5
1 parent abb0849 commit 735a0f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

queryHandler/QueryHandler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def __colstat(self, column, fn, reverse=False):
343343
else:
344344
data = (row.values[idx] for row in self.rows)
345345
try:
346-
return fn(list(filter(None, data))) # list is needed for py 3
346+
return fn(list(filter(lambda x: x is not None, data)))
347347
except Exception:
348348
return None
349349

@@ -361,7 +361,7 @@ def __downsample(self, fn, interval, column = 'all'):
361361
if len(column_values) == column_values.count(None):
362362
aggr_value = None
363363
else:
364-
aggr_value = fn(list(filter(None, column_values)))
364+
aggr_value = fn(list(filter(lambda x: x is not None, column_values)))
365365
except Exception:
366366
aggr_value = None
367367
aggr_values[idx] = aggr_value

0 commit comments

Comments
 (0)