Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions splunklib/searchcommands/generating_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,12 @@ def _execute(self, ifile, process):

def _execute_chunk_v2(self, process, chunk):
count = 0
records = []
for row in process:
records.append(row)
self._record_writer.write_record(row)
count += 1
if count == self._record_writer._maxresultrows:
break

for row in records:
self._record_writer.write_record(row)

if count == self._record_writer._maxresultrows:
self._finished = False
else:
Expand Down
3 changes: 2 additions & 1 deletion splunklib/searchcommands/internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,8 @@ def write_record(self, record):

def write_records(self, records):
self._ensure_validity()
records = [] if records is NotImplemented else list(records)
if records is NotImplemented:
return
write_record = self._write_record
for record in records:
write_record(record)
Expand Down