Fix deleteing more than 1000 history entries at the same time

This commit is contained in:
JonnyWong16 2020-07-08 12:27:20 -07:00
parent 4a8748e322
commit ad195f0969
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 16 additions and 7 deletions

View file

@ -31,7 +31,7 @@ import datetime
from functools import wraps
import hashlib
import imghdr
from future.moves.itertools import zip_longest
from future.moves.itertools import islice, zip_longest
import ipwhois
import ipwhois.exceptions
import ipwhois.utils
@ -1068,6 +1068,11 @@ def grouper(iterable, n, fillvalue=None):
return zip_longest(fillvalue=fillvalue, *args)
def chunk(it, size):
it = iter(it)
return iter(lambda: tuple(islice(it, size)), ())
def traverse_map(obj, func):
if isinstance(obj, list):
new_obj = []