]> git.ipfire.org Git - ipfire.org.git/commitdiff
web: Drop grouper function
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 25 Nov 2020 23:54:40 +0000 (23:54 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 25 Nov 2020 23:54:40 +0000 (23:54 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/__init__.py

index fd5f801642282c59d8dbcd82808877841ad2e0a5..651d4de7f984408f61feafba7e0570b469f2378e 100644 (file)
@@ -1,7 +1,6 @@
 #/usr/bin/python
 
 import logging
-import itertools
 import os.path
 import phonenumbers
 import phonenumbers.geocoder
@@ -56,7 +55,6 @@ class Application(tornado.web.Application):
                                "format_phone_number"          : self.format_phone_number,
                                "format_phone_number_to_e164"  : self.format_phone_number_to_e164,
                                "format_phone_number_location" : self.format_phone_number_location,
-                               "grouper"                      : grouper,
                        },
 
                        # UI Modules
@@ -420,17 +418,3 @@ class Application(tornado.web.Application):
                ]
 
                return ", ".join((e for e in s if e))
-
-
-def grouper(handler, iterator, n):
-       """
-               Returns groups of n from the iterator
-       """
-       i = iter(iterator)
-
-       while True:
-               ret = list(itertools.islice(i, 0, n))
-               if not ret:
-                       break
-
-               yield ret