Skip to content
Snippets Groups Projects
Commit af458f7f authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[statistics][view] Fix use of izip_longest

parent febd01ff
No related branches found
No related tags found
1 merge request!2551.4.x
...@@ -27,7 +27,11 @@ ...@@ -27,7 +27,11 @@
import datetime import datetime
import itertools
try:
from itertools import izip_longest
except ImportError:
from itertools import zip_longest as izip_longest
import simplejson import simplejson
...@@ -152,7 +156,7 @@ def convert_values(stats): ...@@ -152,7 +156,7 @@ def convert_values(stats):
def grouper(n, iterable, fillvalue=None): def grouper(n, iterable, fillvalue=None):
"grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx" "grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
args = [iter(iterable)] * n args = [iter(iterable)] * n
return itertools.izip_longest(fillvalue=fillvalue, *args) return izip_longest(fillvalue=fillvalue, *args)
def get_statistics(hours_to_go_back, cluster_by): def get_statistics(hours_to_go_back, cluster_by):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment