map already returns an iterator, no need to wrap it in iter

Thanks to andreip for pointing it out!
This commit is contained in:
Honza Král
2016-01-15 14:12:03 +01:00
parent 99c284d015
commit 8342e0efb1
+1 -1
View File
@@ -95,7 +95,7 @@ def _process_bulk_chunk(client, bulk_actions, raise_on_exception=True, raise_on_
# deserialize the data back, thisis expensive but only run on
# errors if raise_on_exception is false, so shouldn't be a real
# issue
bulk_data = iter(map(client.transport.serializer.loads, bulk_actions))
bulk_data = map(client.transport.serializer.loads, bulk_actions)
while True:
try:
# collect all the information about failed actions