Skip to content

Commit ae7f1d4

Browse files
fix: use public maxresultrows property to fix lint errors
1 parent 3812796 commit ae7f1d4

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

splunklib/searchcommands/generating_command.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,10 @@ def _execute_chunk_v2(self, process, chunk):
211211
for row in process:
212212
self._record_writer.write_record(row)
213213
count += 1
214-
if count == self._record_writer._maxresultrows:
214+
if count == self._record_writer.maxresultrows:
215215
break
216216

217-
if count == self._record_writer._maxresultrows:
217+
if count == self._record_writer.maxresultrows:
218218
self._finished = False
219219
else:
220220
self._finished = True

splunklib/searchcommands/internals.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,10 @@ def __init__(self, ofile, maxresultrows=None):
462462
self._committed_record_count = 0
463463
self.custom_fields = set()
464464

465+
@property
466+
def maxresultrows(self):
467+
return self._maxresultrows
468+
465469
@property
466470
def is_flushed(self):
467471
return self._flushed

0 commit comments

Comments
 (0)