Skip to content

Commit 6ac64d8

Browse files
Update generating_command.py
1 parent 9705bef commit 6ac64d8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

splunklib/searchcommands/generating_command.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,17 @@ def process(self, argv=sys.argv, ifile=sys.stdin, ofile=sys.stdout, allow_empty_
233233
:param ofile: Output data file.
234234
:type ofile: file
235235
236-
:param allow_empty_input: It is set to true for generating commands.
236+
:param allow_empty_input: For generating commands, it must be true. Doing otherwise will cause an error.
237237
:type allow_empty_input: bool
238238
239239
:return: :const:`None`
240240
:rtype: NoneType
241241
242242
"""
243-
allow_empty_input = True
244-
return super().process(argv=argv, ifile=ifile, ofile=ofile, allow_empty_input=allow_empty_input)
243+
if not allow_empty_input:
244+
raise ValueError("allow_empty_input cannot be False for Generating Commands")
245+
else:
246+
return super().process(argv=argv, ifile=ifile, ofile=ofile, allow_empty_input=True)
245247

246248
# endregion
247249

0 commit comments

Comments
 (0)